4

Magento 2.3.2 upgrade after 2.2.6 having issue on product page. Images aren't appearing on product pages. The path coming is 404

/catalog/product/cache/50dd8aa5084eb9449e88d424223230cd/image/194413ea80/netgear-24-port-24-poe-4x-sfp-10-100-smart-switch-fs728tp-100eus-netfs728tpoer.jpg

However the correct path seems to be:

/catalog/product/cache/50dd8aa5084eb9449e88d424223230cd/n/e/netgear_ft728tp.jpg

Ran command catalog:image:resize, it recovered some product page images but not all. Anybody faced same issue?

4 Answers 4

1

I had this exact same problem with Magento 2.3.2

For me it was product thumbnail images that had the wrong cache hash path. Product and category images were correct, but thumbs URL was incorrect and showing the std Magento image placeholder.

I was using a custom theme.

When using SHH "php bin/magento catalog:images:resize" - what was happening? The images were being generated using the Luma theme etc/view.xml instead of the custom theme etc/view.xml file.

The problem. When viewing my custom theme in the browser which users different size images to Luma theme, Magento could not fine the images and shows 404 error.

The fix. 1. Replace Luma themes etc/view.xml with my custom theme etc/view.xml 2. Using SHH run "php bin/magento catalog:images:resize

I took me a week to find out how to fix this, but it all work fine now. It's a Magento 2.3.2 bug i think!

1
  • Had run this command already, it recovered some images but not all. The thing is, the same code and db are working fine on my staging server, the issue is only on live. Also if I flush images cache on live site, the images are gone again (this should not happen) and then are recovered by image:resize command. Also these all functionality are working fine on my staging site. Sep 18, 2019 at 8:19
1

/catalog/product/cache/50dd8aa5084eb9449e88d424223230cd/image/194413ea80/netgear-24-port-24-poe-4x-sfp-10-100-smart-switch-fs728tp-100eus-netfs728tpoer.jpg is not the out of the box Magento image url format, it would normally look something like /catalog/product/cache/50dd8aa5084eb9449e88d424223230cd/n/e/netgear_ft728tp.jpg. The former url looks like one generated by an SEO module giving the image url an SEO friendly file name based on the product name. It it were working as expected the SEO friendly image would be generated too but as a quick solution turning off the SEO friendly image url setting will probably resolve your problem. I don't know what module you are using but I have seen this with the Mirasvit SEO module. If you are using that the configuration is under Stores -> configuration -> Mirasvit Extensions -> Seo -> Image Settings -> Enable SEO-friendly URLs for Product Images. I know there are similar settings on other modules. The impact on SEO will be minimal

0

Try clearing your cache manually first:

$ rm -rf var/cache/* var/page_cache/*

Then re-run image resizing:

$ bin/magento catalog:image:resize 
6
  • done that already! no luck. Aug 16, 2019 at 20:02
  • Did you use varnish or other http accelerator or cache app? You need to restart it as well. Aug 17, 2019 at 6:13
  • I use fastly cache, and and have purged that all. Also if I flush catalog images cache from admin, then all the product page images are lost and had to re-run image:resize command. But then again not all images are recovered. I magento is not generating cache for product pages or isn't using the correct path for cache images for product pages. Aug 17, 2019 at 6:51
  • So any other fix? Aug 17, 2019 at 10:00
  • @ArsalanUlHaq were you able to fix it ? Feb 4, 2021 at 13:21
0

have you managed to fix the error yet?

Please see your config in the theme you are using and make sure your source store's config is the same with your target's. You can refer to this: https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/themes/theme-images.html

Then run:

php bin/magento catalog:images:resize

Let me know if this helps!

3
  • 1
    Had run this command already, it recovered some images but not all. The thing is, the same code and db are working fine on my staging server, the issue is only on live. Sep 18, 2019 at 8:16
  • @ArsalanUlHaq I hope you found some solution . Kindly share it here.
    – M RIZWAN
    Sep 9, 2020 at 15:19
  • Nope didn't find any permanent fix other than running command catalog:image:resize. This command throws error of image not found so I put some code to add thumbnail for those images that aren't found. Though this is a temporary solution. - if image not found error, then in vendor/magento/framework/Image.php comment exception: in open() function -> File '{$this->_fileName}' does not exist. and add: $this->_fileName = '/var/www/uk/releases/20190731045023/pub/static/frontend/Sm/custom/en_GB/Magento_Catalog/images/product/placeholder/image.jpg'; Sep 10, 2020 at 7:09

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.