Question

Photo of Jon Morrissette

0

How can I display a person's image in a merge template?

Trying to create a merge template that prints a photo directory of people in a small group. 

If I do this...  the lava never gets inserted into the image tag, its just blank.

{% for Row in Rows %}

<tr> <td><img src="{{ Row.Photo.Url }}"> </td> </tr>

{% endfor %}


If I do this...  I can get the photo url as plain text.  So weird!

{% for Row in Rows %} 

<tr> <td>{{ Row.Photo.Url }} </td> </tr> 

{% endfor %}


  • Photo of Jon Morrissette

    0

    I was using HTML.  There were two problems. First, the browser security mode was not allowing the browser to show images from a temporary html file.  Second, I had to change the syntax for my image selection.  I tried using the global attribute for the root, but it along with the photourl value put double slashes into my URL argh.

    <img src="https://www.lakesidechristian.com{{ Row.PhotoUrl }}" height="100px" align="left">

    • Eddie Holeman

      We use an html merge document which is very similar. The only difference might be that we use a Global Attribute instead of hard coding the https://www portion. Here it is: <img src="{{ 'Global' | Attribute:'PublicApplicationRoot' }}{{ row.PhotoUrl }}" style="width: 100%; border-radius: 100px;" />

  • Photo of Randy Reed

    0

    The documentation show this as the syntax:

    <img src="{{ 'Global' | Attribute:'PublicApplicationRoot' }}{{ row.PhotoUrl }}" style="width: 100%; border-radius: 100px;" />