6

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.

  • 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 – Claudiu Creanga Jul 8 '16 at 10:57
  • Seems like it's the same in Mage2. The borders disappear with larger image dimensions. – Azul_Falcone Jul 8 '16 at 11:00
1

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>
0

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? – Azul_Falcone Jul 8 '16 at 12:38

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.