- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Generally, product images are cached while saving the product. However, the catalog:images:resize command enables you to resize all images for display on your storefront. After resizing an image, its resized copy is stored in the cache (/pub/media/catalog/product/cache directory). Magento2 serves storefront images from cache. But is it re-generate cache every time from beginning ? Or it will generate only non existing cache or deleted cache of the products. Please, help me to understand.
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @DTZDeveloper,
Normally the cache copy is created when is requested for the first time.
At that moment Magento reads the original image and creates the copy in the right size and store that new file into the cache directory.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @DTZDeveloper,
Normally the cache copy is created when is requested for the first time.
At that moment Magento reads the original image and creates the copy in the right size and store that new file into the cache directory.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Image Resize
Hi @Damian Culotta,
Thanks for your reply. I have got my answer.
when running this command, magento2 will not create another image size if one already exists in the image cache (stored in the media/catalog/product folder).