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/No: keep generation on, or skip writing new resized cache files.
Enable Product Image Cache Generation defaults to Yes — Magento writes resized files as usual. Set No and the module skips saveFile on the catalog product image. Existing cache files are not deleted.
Stores → Configuration
Emmo → Product Image Cache
Enable Product Image Cache Generation
Yes = write resized cache
No = skip new cache writes
Default: Yes
Scope: store view
What it touches
New cache files — not the gallery originals
On (default)Magento generates and saves resized product images to the catalog image cache. Same as stock Magento.
OffNew resized files are not written. Disk stops growing from automatic cache generation.
Left aloneOriginals in pub/media/catalog/product. Files already in cache. The product gallery in Admin.
Per storeWebsite and store view scopes. Pause generation on staging and keep it on for the live view.
Use it / leave it
A generation pause — not a media cleaner
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 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 files back.
Go live
Five steps. Flip one Yes/No.
1InstallEnable Emmo_ProductImageCacheSwitch and run setup:upgrade.