cancel
Showing results for 
Search instead for 
Did you mean: 

Image Resize

SOLVED

Image Resize

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.

2 REPLIES

Re: Image Resize

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.

--
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution"

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).