After migrate the website from localhost to server I see that all image is 404 now and when I see the path I see that product images are path are wrong in everywhere .

Now the path is being call


Where as it need to be


So what I understand is here is only the slash(/) is missing between product and cache.

I run all command like setup:upgrade , catalog image resize, content deploy .

But nothing solve the issue. Anyone face the same issue before ? Can you tell me how to solve it ?

  • No in developer mode
    – Asish Hira
    Jul 20, 2017 at 7:47
  • Those steps already done by me
    – Asish Hira
    Jul 20, 2017 at 7:49
  • it have apache installed
    – Asish Hira
    Jul 20, 2017 at 7:53
  • ok then check rewrite mode is on or not ? it must be on , Jul 20, 2017 at 7:55
  • Yes that is on because urls are working fine
    – Asish Hira
    Jul 20, 2017 at 7:56

2 Answers 2


Delete files inside these folders from server file manager or FTP


Then run following commands in sequence

   php bin/magento setup:upgrade

    php bin/magento setup:di:compile

    php bin/magento setup:static-content:deploy

    php bin/magento cache:clean

    php bin/magento cache:flush

php bin/magento deploy:mode:set production

php bin/magento cache:enable

php bin/magento cache:clean

php bin/magento cache:flush

I hope this should solve out your problem

  • I already said in my question that I did those things
    – Asish Hira
    Jul 20, 2017 at 7:48
  • try using setting production mode Jul 20, 2017 at 7:51

Admin screen pathWrong image cache in frontend

I solved it with update the admin settings as bellow

Admin panel > Stores > Settings > Configuration > GENERAL > Web > Url Options > Catalog media URL format

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.