2

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

pub/media/catalog/productcache/aa0b8856d0d44b2f592207c1826506a3/9/_/9_6.jpg

Where as it need to be

pub/media/catalog/product/cache/aa0b8856d0d44b2f592207c1826506a3/9/_/9_6.jpg

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 ?

8
  • 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

3

Delete files inside these folders from server file manager or FTP

var/cache
var/page_cache
var/view_preprocessed
var/generation 

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

2
  • 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
0

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.