I've been working on improving Magento product image quality since the start of the week. I have clients spend big bucks in product photography and their photos came out pin sharp, however, after product images uploaded the Magento (currently on 2.3), all product images look really washed out. Turned out by default Magento 2 has quite aggressive image compression on both gd2 and imagemagick.

I'm still figuring out the solution, but while I was checking product image cache, I found something needs a bit attention: there are a lot of duplicated images in image cache. To be specific, after uploading just one product image, I counted 22 images in total in the cache folder:

  • 16 images are the same size at 4k
  • 3 images are the same size as 8k
  • 1 image at size 32k
  • 1 image at size 52k
  • 1 image at size 72k

My original product image size is 232k. As you can see how much compression there is, which is outrageous from my point of view!

I'm not sure why do we need so many variations of the exact image? Are they there for good reasons or it's just poorly done? This keeps bothering me because I cannot stop thinking how much server space we've wasted for the way image cache is done; while on the other hand we aren't able to get a decent image quality we deserve. Any opinions are appreciated, thank you!

2 Answers 2


This is Magento's default feature, it creates images according to the place where it is going to be shown and the required size.

You can check the documentation : Configure images properties for a theme

this Q/A also has some good info : What is the use of Magento 2.2.6 product image cache?

  • Thanks for your comment. I found something that has more direct answer to my original question - why there are so many the exactly resized images (16 of them)?
    – Ethan Wan
    Feb 7, 2019 at 10:39

I found the settings in Magento Admin related the my question, which is why there were 16 of the exact same sized images?

Under Store -> Configuration -> Catalog -> Catalog -> Storefront -> Swatches per product was default at 16. I'm guessing for the ones who never going to have that many swatches per product we could reduce this number?

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.