I want to resize product view gallery image. I want to resize main product image to 500X500 size?
How can we achieve this?
image resizingmagento2product-images
I want to resize product view gallery image. I want to resize main product image to 500X500 size?
How can we achieve this?
Best Answer
Magento uses the file called view.xml which is maintained at the theme level of the application.
So for example, if you are using the default theme luma you should find the view.xml under vendor/magento/theme-frontend-luma/etc/view.xml
In this file, you would see node inside the node.
The dimension of the images is maintained here under the node.
The id attribute value of the node is referenced in the code base.
You can define your custom view.xml in your theme and define width & height as per your requirement.
Once the values changes have been done, you will have to run
This will regenerate the new image sizes.