Magento resizes every product photo into theme sizes and writes them under pub/media/catalog/product/cache. After a cache flush, an import, or a theme change, that folder fills again. This switch is one Admin Yes or No: keep generation on, or skip writing new resized cache files.
One Yes or No under Emmo
Stores → Configuration → Emmo → Product Image Cache. Enable Product Image Cache Generation defaults to Yes, so Magento writes resized files as usual. Set No and the module skips saveFile on the catalog product image.
Off stops new resized files, so disk stops growing from automatic cache generation. Originals in pub/media/catalog/product stay. Files already in the cache stay. The product gallery in Admin stays.
Yes, the defaultMagento generates and saves resized product images to the catalog image cache. Same as stock Magento.
NoNew resized files are not written. The module skips saveFile on the catalog product image. Existing cache files are not deleted.
Where it livesStores → Configuration → Emmo → Product Image Cache. The config path is emmo_product_image_cache/general/enabled. Scope is the store view.
What is left alone
Gallery originalsFiles in pub/media/catalog/product are not touched.
Cache already on diskFiles already under pub/media/catalog/product/cache stay. Off is a write skip, not a flush.
Admin galleryThe product gallery in Admin is unchanged. This is not a media cleaner and not a resize CLI.
Turn it Off when
You do not want Magento rewriting cache right now.
You flushed image cache and need disk I/O to stay quiet.
A catalog import or a theme change would regenerate thousands of sizes.
Staging, or a copy of production, should not fill product/cache.
A CDN or another resize path already serves the sizes you need.
Keep it On when
The storefront still needs Magento’s resized files.
You emptied pub/media/catalog/product/cache and shoppers still hit those URLs.
You expected a delete tool. This does not remove files.
You need unused originals gone. That is a different module.
You have not flushed Magento config cache after saving No.
Off is a write skip, not a flush. Cache files already on disk stay. If the cache folder is empty and generation is Off, resized URLs can 404 until you turn it On again or put the files back.
Five steps. Flip one Yes or No.
1Enable Emmo_ProductImageCacheSwitch and run setup:upgrade. Unzip the package as app/code/Emmo/ProductImageCacheSwitch.
3Yes to generate. No to skip new cache writes. Save.
4Clear Magento configuration cache, and full page cache if you use it, so the store reads the new value.
5Open a product. With Off, new files should not appear under catalog/product/cache.
After save
Config cache Flushed
product/cache No new files
Gallery original Still there
No image flush. No unused-file delete. No resize CLI. It only stops or allows Magento writing new product image cache files. Magento Open Source and Adobe Commerce. PHP 8.1–8.5. Stores configuration, store-view scope. Setting: emmo_product_image_cache/general/enabled. Support: [email protected]