Magento – How to remove the white borders from images? Magento 2.1

frontendmagento2product-images

All my images appear like this.

<image id="category_page_grid" type="small_image">
    <width>240</width>
    <height>300</height>
    </image>
    <image id="category_page_grid-1" type="small_image">
    <width>240</width>
    <height>300</height>
</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?

EDIT:

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

Best Answer

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

<transparency>false</transparency>
Related Topic