How to fix the displayed height of a loop & merge image? | XM Community
Skip to main content
Hello. My survey has a block in which subjects answer a two-choice question about a loop & merge image. I need all the images to be displayed with the same height dimension, but the images have different aspect ratios, so the width should be scaled in proportion to the height. In the HTML field of the loop & merge question, I have tried:

<img src="${lm://Field/1}" style=“height:300;”>

<img src="${lm://Field/1}" style="width:auto;height:300;”>

<img src="${lm://Field/1}" height=“300”;>

These do not seem to change the way the images are displayed., However, confusingly, if I switch the words “height” and “width” these methods work perfectly well to fix the width of the images. Any ideas on how I can fix the height dimension of my images?

(Also, applying a CSS class to the img HTML tag did not work, either.)

Thanks!
In the image library you can upload all images of same dimensions. Doing so when you will pipe , they all will be of same size.
Thanks. However, I have over 200 images and will be running more in the future. Because it works to fix width it seems there must be a simple reason (and possibly work-around) for why it doesn't work with height.
Set the min and/or max heights, and you don't need to set width:

```

<img src="${lm://Field/1}" style="max-height:300px;min-height:300px”>

```

Leave a Reply