Magento 2 Product Image Cache Switch | Emmo

  • Item Number (EMMO): magento-2-product-image-cache-switch
$49.99 FREE SHIPPING IN PAKISTAN
plus shipping and handling
$49.99 FREE SHIPPING IN PAKISTAN
Emmo
1
1
Add to Wishlist

Emmo · Magento 2

Turn Magento product image cache writes on or off

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.

Admin Yes / No Store scope Skip cache writes Originals stay

The setting

Stores → Configuration → Emmo → Product Image Cache

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.
Off New resized files are not written. Disk stops growing from automatic cache generation.
Left alone Originals in pub/media/catalog/product. Files already in cache. The product gallery in Admin.
Per store Website 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.

1 Install Enable Emmo_ProductImageCacheSwitch and run setup:upgrade.
2 Open config Stores → Configuration → Emmo → Product Image Cache.
3 Set the switch Yes to generate. No to skip new cache writes. Save.
4 Flush config Clear Magento configuration (and FPC if you use it) so the store reads the new value.
5 Check Open a product. With Off, new files should not appear under catalog/product/cache.

What you get

Compatibility

Magento Open Source & Adobe Commerce PHP 8.1–8.5 Stores configuration Store-view scope

Downloads

  • Module package — unzip as app/code/Emmo/ProductImageCacheSwitch, enable, run setup:upgrade
  • Setting — emmo_product_image_cache/general/enabled

Not included

No image flush. No unused-file delete. No resize CLI. It only stops or allows Magento writing new product image cache files.

Pause Magento product image cache writes from Admin — then turn them back on when you are ready. Support: [email protected]

More Information

More Information
Follow Meta Tag Index HTML page, follow links

Reviews

Write Your Own Review
Only registered users can write reviews. Please Sign in or create an account