1

I have a website builder with Magento 1.9.3.4, and I used a paid template package on the site, the package has 5 themes, my site only used the default theme and I found my server disk space was swallowed by the folder in this path : /media/catalog/product/cache/1, the Magento automatically creates 5 different file size for one image in folder /media/catalog/product/cache/1, I think Magento must create different images size for those themes not in use.

As my website has 5K products and I have 30000+ products images total, in such case, the product cache folder is keep taking out all my disk space, it is huge size space.

Do you guys have any suggestions that let the Magento not to generate different size images for those themes not in use?

0

The different images in the cache directory are for the various sizes Magento generate and then serve up on various areas of the webiste - image, small_image and thumbnail as well as a few others.

To clear out unused images, I would suggest setting up the following script in the /shell directory of your Magento install and running it manually from time to time: https://gist.github.com/jeroenvermeulen/e1dc727bcaadeade14ea

It will scan through all images and compare it to the ones in use in the catalog_product_entity_media_gallery table. If the image isn't found in that table it will be removed. I would suggest running on a staging/development environment first for testing but can save a lot of space for large catalogues.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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