Magento – Magento2 product image path issue

magento2

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 ?

Best Answer

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

Related Topic