I have created customize theme which extends to magento blank. I am using widget to show latest products in home page.
Now, My page look like this
I want to resize the every image (catalog product list) in widget. I will expect my page look like this
Note : I could refer this link to change all image size but no luck. copy view.xml from blank theme, paste into app/design/…./mytheme/etc/view.xml. I change below content in view.xml
<image id="category_page_grid" type="small_image">
<width>400</width>
<height>400</height>
</image>
<image id="category_page_list" type="small_image">
<width>400</width>
<height>400</height>
</image>
but nothing get reflected
here I put two questions
-
How to resize individual image in product list
-
Why mytheme view.xml get not reflected
Best Answer
1) you can define any new image type in the view.xml. To use it you have to pass the image id to the image helper used like here for example: https://github.com/magento/magento2/blob/develop/app/code/Magento/Catalog/Block/Product/View/Gallery.php#L60
2) if I got the right widget here, you have to override a differrent image id:
grid: https://github.com/magento/magento2/blob/develop/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/content/new_grid.phtml#L21
list: https://github.com/magento/magento2/blob/develop/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/content/new_list.phtml#L21
So you would have to override these images in your view.xml:
grid: https://github.com/magento/magento2/blob/develop/app/design/frontend/Magento/blank/etc/view.xml#L55
list: https://github.com/magento/magento2/blob/develop/app/design/frontend/Magento/blank/etc/view.xml#L59