I am having a problem with how my images are displaying on my Magento 2 store.
And also I would like to know:
catalog:images:resize in Magento 2.x version ?
The images size is defined in
<theme_dir>/etc/view.xml. You can also manually modify according to your requirement.
<images module="Magento_Catalog"> <image id="unique_image_id" type="image"> <width>100</width> <!-- Image width in px --> <height>100</height> <!-- Image height in px --> </image> </images>
But, if you have following conditions:
1. If you imported products which might have variable sized images 2. If images were resized or deleted manually from cache
catalog:images:resize command enables you to resize images for display on your storefront.
I hope this helps you !!
Generally, product images are cached while saving the product from admin panel. However, sometimes you may need to re-create the product images cache after you import products, if images were resized manually in the cache, or if the cache was manually cleared by mistake.
php <magento install dir>/bin/magento catalog:images:resize
This command takes no arguments or options.
The message Product images resized successfully. displays to confirm the command succeeded.