Images from library in Loop and Merge Fields? | XM Community
Skip to main content
Hello! I'm trying to build a survey where participants are shown three images -- one scene, as the question, and two objects, as the possible answers. Participants will be asked to pick the object that 'goes' with the scene. I want to use Loop & Merge to loop through 32 scenes and 32 pairs of objects, all of which reside in my Graphics Library. According to Qualtrics Support one could use the HTML for the image in the Field and then pipe it in, but I'm unsure how exactly to do that. Just pasting in the URL for its location in my library results in the URL being displayed. Any assistance is appreciated! Thanks!
Put it in an html img tag:

```

<img src="${lm://Field/1}">

```
> @TomG said:

> Put it in an html img tag:

> ```

> <img src="${lm://Field/1}">

> ```



Many thanks!
Hi. I've been trying to use the advice here to create a loop and merge where the image changes every time the loop renews, but I'm trying everything n can't seem to get this to work. Could you guys give me a more detailed example of how to do it? For example, where does everything go?
1. Put the urls (https://etc.) in your loop and merge block setup as one of the fields. If it is Field1 its pipe will be ${lm://Field/1}, Field2 - ${lm://Field/2}, etc.

2. Add the `<img>` tag as shown above to your question. If it is in the question text add it in html mode.
Hi TomG. I read this Q&A and found it helpful. However, when I added the image tag as described, the image still is not shown. The HTML code looks like this:



${lm://Field/1}

<div><br />

 </div>

<img src="${lm://Field/2}" />



When I test the survey, the name of the Concept appears correctly: Bridge. That is Field 1. But the image does not show (Field 2). A small square check box is shown with 2} adjacent to it.



I checked the url in the loop and merge fields, and they all pull up the graphic when I put them in my google web browser. For instance, one of them is:



https://clearpathmr.az1.qualtrics.com/ControlPanel/Graphic.php?IM=IM_1zfPZePWGVzHUDX



I spoke with HelpDesk and they told me that Images cannot be put in a Loop & Merge field, unless specific code is used, and they could not help with that. They told me to avoid this issue by instead making a separate block for all my Concepts to be tested, with each block having the same questions I needed, and then using the Randomizer to pick which blocks are shown to respondents. So I can do that, but it seems less efficient than the way you were instructing.



Any help would be appreciated.



thanks,



Michael

Leave a Reply