As the title says I have been having problems with swatch images not appearing on the front end on the widget on my homepage or on the catalog page. Images do however appear for those very same products on their product pages. And it does not occur on every product.

It seems to occur after I have updated an image for an existing product and not for new products.

I have manually cleaned the generated files, cleaned the cache, reindexed eveything, redeployed static content, and resized images all with no luck.

The main difference between the images that are appearing and those that are not is that the .pagespeed.ic.j4HRSrc9zE.webp is added to the images that are not appearing. I am not sure where this is being added and if there is a way to disable or modify a file somewhere to stop this since its breaking the links.


Edit: I also noticed that it is adding an 'x' before the file name as well for example


turns into


I found this issue on github https://github.com/magento/magento2/issues/19710 but my issue seems different since the caching hash is correct, only the file name is prepended and appended and nothing else.

2 Answers 2


I contacted my hosting provider and it was the pagespeed plugin for Apache that was appending the code. Once that was disabled everything works great.

Hope this helps someone else.


After debugging possibly everything I could, reading almost all posts concerning this issue and trying maybe all possible solutions to this issue, I added the following code in .htaccess file so that I disable mod_pagespeed apache module and everything worked again like a charm!

<IfModule pagespeed_module>
ModPagespeed off

Hope this helps you.

Your Answer

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

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