5

I can control the product images width/height in view.xml located in app/design/<vendor>/<theme>/etc in product list page. Some of the products not having images so it tries to show placeholder image. But placeholder width/height is not able to control in view.xml

<image id="category_page_grid" type="small_image">
    <width>240</width>
    <height>240</height>
 </image>
<image id="category_page_list" type="small_image">
     <width>240</width>
     <height>240</height>
</image>
<image id="product_small_image" type="small_image">
     <width>240</width>
     <height>240</height>
</image>
  • Try to flush your image cache – Rinto George May 12 '16 at 12:15
3

The placeholder images will use the same values to resize as the product image do. So the config you provided will also resize the placeholder images.

You have to make sure to add your own placeholder images in Magento's backend at Configuration> Catalog > Catalog >Product Image Placeholders. Also remember to re-upload the images in the backend after you change the values in view.xml.

  • it is not working if we do not upload new placeholder image. we can consider it as bug ? – Minesh Patel Dec 28 '16 at 9:36
  • Have you tried flushing the images cache via Flush Catalog Images Cache at the Cache Management page in the backend? – Stef Dec 29 '16 at 8:01
  • yes.i did that.. – Minesh Patel Dec 29 '16 at 9:02
  • @Stef do you know why you need to "upload the images in the backend after you change the values in view.xml" – Holly Aug 14 '17 at 9:51
  • @Stef posted a question on it at magento.stackexchange.com/q/189049/6549 – Holly Aug 14 '17 at 9:59
0

Magento's backend at Configuration> Catalog > Catalog >Product Image Placeholders. There are four options base, small, swatch and thumbnail

I have uploaded resize placeholder image for small option, and its working for listing page properly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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