All my images appear like this.

<image id="category_page_grid" type="small_image">
    <image id="category_page_grid-1" type="small_image">

Thats the setting in my view.xml file. I changed the width/height, but the outcome was the same. I've checked the images and there is no border on them in PS. So my only guess is that Magento applies this? The image size is 1080 x 720 jpg. Do I need to increase its dimensions?


Seems that increasing the image size to over 1600 x 1200 will remove this border.

  • in mage1 this was happening when some of your images were smaller than the specified size, don't know if this is true in mage2 Jul 8, 2016 at 10:57
  • Seems like it's the same in Mage2. The borders disappear with larger image dimensions. Jul 8, 2016 at 11:00

2 Answers 2


Set transparency to false.
You can read more about how to configure the image properties in view.xml at http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/themes/theme-images.html


it is not possible to resolve only using css trick.

There is only one method to resolve this issue.

You need to check image proposition through script and scale it.

generally image scale in squarer proposition but in your case image width is greater than height.

  • So would it just be a matter of reducing the height in view.xml? Jul 8, 2016 at 12:38

Your Answer

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

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