0

I tried to set the product pictures from category page to 800x800 px and i can't.

Be default the picutres size is 270x270 px; I changed in view.xml the values for this fields into 800x800 px but nothing happend.

<image id="category_page_grid" type="small_image">
                <width>800</width>
                <height>800</height>
            </image>
            <image id="category_page_list" type="small_image">
                <width>800</width>
                <height>800</height>
            </image>

Does anyone know how can i do this?

10
  • have you flush all cache? check in pub/media/catalog/product/.... if the folder 800x800 is created (note: my default size are 240x300)
    – LucScu
    Nov 16, 2017 at 9:10
  • yes. i flush all the cache.if i am looking in the path that you said, the folder 800x800 is not there Nov 16, 2017 at 9:40
  • try to flush pub/media/catalog/product/cache/, then browse your site and watch which product images are recreated.
    – LucScu
    Nov 16, 2017 at 9:43
  • rigjht now. i see in cache that i have 2 folder. first one is 270 and the second one is 800x800 Nov 16, 2017 at 10:24
  • but after flush the cache and go incognito, when i inspect the img the size is 270x270. doyou have any idea why? Nov 16, 2017 at 10:24

1 Answer 1

0

After make change in size value . you need to run below command

php bin/magento catalog:images:resize

This will regenerate the new image sizes. you can take as reference this answer.

In case of changing/overwriting the values of the view.xml file you need to completely copy the entire view.xml file to your custom theme and change the values.

view.xml does not have a node value fallback system, means if a value of a node is not present in you custom theme's view.xml it will not fallback to its parent theme's view.xml value, that's why entire file needs to be copied.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.