# Adding image paths to template repeater

**URL:** <https://forum.inductiveautomation.com/t/adding-image-paths-to-template-repeater/27316>\
**Category:** Ignition\
**Created:** [August 9, 2019, 3:52pm UTC](https://forum.inductiveautomation.com/t/adding-image-paths-to-template-repeater/27316 "2019-08-09T15:52:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jomo23](https://avatars.discourse-cdn.com/v4/letter/j/f6c823/32.png) [@jomo23](https://forum.inductiveautomation.com/u/jomo23)\
**Post date:** [August 9, 2019, 3:52pm UTC](https://forum.inductiveautomation.com/t/adding-image-paths-to-template-repeater/27316/1 "2019-08-09T15:52:53Z")

</div>

I would like to reference my created template in my template repeater. My template consists of an image path however I would like to be able to have it so that my template can be three different images. How can I then have my template repeater repeat the template but with different pictures based on my custom properties? For example I would like my first picture to be associated with “custompropertya” second picture associated with “custompropertyb” and the last picture with “custompropertyc”.

---

<div class="post-metadata">

**Author:** ![code\_skin](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@code\_skin](https://forum.inductiveautomation.com/u/code_skin)\
**Post date:** [August 9, 2019, 4:54pm UTC](https://forum.inductiveautomation.com/t/adding-image-paths-to-template-repeater/27316/2 "2019-08-09T16:54:34Z")

</div>

You could use a template parameter to achieve this. If you have a parameter called **pictureType**  
You could pass in the imagePath or a Integer value and then use the expression language inside the template that will point to the different image paths.

---

<div class="post-metadata">

**Author:** ![jomo23](https://avatars.discourse-cdn.com/v4/letter/j/f6c823/32.png) [@jomo23](https://forum.inductiveautomation.com/u/jomo23)\
**Post date:** [August 9, 2019, 9:18pm UTC](https://forum.inductiveautomation.com/t/adding-image-paths-to-template-repeater/27316/3 "2019-08-09T21:18:24Z")

</div>

How would I use expression language inside the template to point to the different image paths?

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [August 12, 2019, 3:19pm UTC](https://forum.inductiveautomation.com/t/adding-image-paths-to-template-repeater/27316/4 "2019-08-12T15:19:21Z")

</div>

```auto
if(<some_condition>, <photo_path_one>, if(<some_secondary_condition>, <photo_path_two>, <photo_path_three>))

```

as a binding for the image component.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [May 15, 2020, 1:31pm UTC](https://forum.inductiveautomation.com/t/adding-image-paths-to-template-repeater/27316/5 "2020-05-15T13:31:37Z")

</div>

Old post, but…  
I would stack your 3 images on top of each other with visibility expressions to hide/show them. The reason not to simply set the path is that I’ve had a number of times where this has failed to change the image, despite the expression evaluating to show a different image path. I will always now use stacked images instead.  
Actually that’s not quite true, I will always try **not** to use images at all, and use vectors instead.
