Sometimes our magento site will not render a picture for a particular product or products on some browsers. For example, on Chrome, if it doesnt show, then if you open a window in incognito it works fine. But non incognito window, you have to clear cache. But this missing image occurs sometimes not all the time. Has anyone experienced this, can anyone help.
Also it is not all images, so on a page we may have 20 images for one category but one may be missing. But if I have another person try it works ok for them, but then for me if I try incognito it works ok. On a browser where it doesnt initially work I have to clear my cache. Any help will be appreciated.
HI @batis _malekpou,
It looks like cache issue and permission issue.
You can try following command.
sudo find . -type d -exec chmod 755 {} \; && find . -type f -exec chmod 644 {} \; && chmod u+x bin/magento sudo chmod -R 0777 var/ pub/ generated/
For some products images are showing, may be cache are not generted for them.
You can try once following commands to regenerate images cache.
php -dmemory_limit = -1 bin/magento catalog:images:resize
I hope it will help you!
@batis _malekpou
There are nothing related to browsers for the product images in the magento. Looks like there is only issue with cache and permission.
Try once above solution.
Might be it will work for you!
Hello @batis _malekpou
It may happen because of Magento images cache generation generates wrong hash for some images with a custom theme that has the keep_frame var set to 0
So try to rename the cache folder of pub/media/catalog/product/ Provide the permission as suggested by @vimal_parihar
sudo find . -type d -exec chmod 755 {} \; && find . -type f -exec chmod 644 {} \; && chmod u+x bin/magento sudo chmod -R 0777 var/ pub/ generated/
And then execute the command :
bin/magento catalog:image:resize
Hope this will help you. If the issue still exist then please look this link once, I hope this will help you https://github.com/magento/magento2/issues/19710
If it helps you, please accept it as solution and give kudos.
Regards.