Skip to content

<background> and crop in view.xml not working #2758

@MathijsDelva

Description

@MathijsDelva

I am trying to get my grid images cropped without any framing. I seem to have two issues with this:

  1. I am not able to crop my images to a certain width/height without creating a (white) frame. Ideal situation would be that my uploaded images get pushed inside the image container, filling both width and height while maintaining the aspect ratio. Much like the cover function in css.
  2. Not being able to get 1. working, i then tried to change the white frame to another background color. But this does not seem to work. Current code:

<image id="product_page_more_views" type="thumbnail">
<width>100</width>
<height>100</height>
<constrain>false</constrain>
<frame>false</frame>
<transparency>false</transparency>
<background>[248,248,248]</background>
</image>

If anybody has any idea how i should get this working..

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions