# Creating Loopic 'html' template with imageloaders, how to address another image to load?

**URL:** <https://casparcgforum.org/t/creating-loopic-html-template-with-imageloaders-how-to-address-another-image-to-load/5014>\
**Category:** General\
**Tags:** template\
**Created:** [August 24, 2022, 11:42am UTC](https://casparcgforum.org/t/creating-loopic-html-template-with-imageloaders-how-to-address-another-image-to-load/5014 "2022-08-24T11:42:15Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Willem](https://casparcgforum.org/letter_avatar_proxy/v4/letter/w/898d66/32.png) [@Willem](https://casparcgforum.org/u/Willem)\
**Post date:** [August 24, 2022, 11:42am UTC](https://casparcgforum.org/t/creating-loopic-html-template-with-imageloaders-how-to-address-another-image-to-load/5014/1 "2022-08-24T11:42:15Z")

</div>

First, congrat the makers of Loopic. What a great tool!  
I made several templates with dynamic data (150 dynamical text items, no problem).  
Now I’m trying to address an template imageloader. As I understand I can use the ADD command for CasparCG and add the data.  
Q: The imagefile should be in the CasparCG ‘pictures’ folder?  
Q: How to address the imagefile with extension?

gr hans

---

<div class="post-metadata">

**Author:** ![imare](https://casparcgforum.org/user_avatar/casparcgforum.org/imare/32/2139_2.png) [@imare](https://casparcgforum.org/u/imare)\
**Post date:** [August 24, 2022, 10:44pm UTC](https://casparcgforum.org/t/creating-loopic-html-template-with-imageloaders-how-to-address-another-image-to-load/5014/2 "2022-08-24T22:44:01Z")

</div>

Hello,

firstly I am happy to hear that you like Loopic 🙂

Answer 1: Image files can be anywhere on the computer. You just need to pass the URL to the image as the key value.

Answer 2: Not sure exactly what you mean, but the URL can look something like this: `C:/Users/your-name/Desktop/logo.png`  
You can get the URL by right-clicking on the file and selecting “Copy as path” (Windows 11).

---

<div class="post-metadata">

**Author:** ![Willem](https://casparcgforum.org/letter_avatar_proxy/v4/letter/w/898d66/32.png) [@Willem](https://casparcgforum.org/u/Willem)\
**Post date:** [September 1, 2022, 10:42am UTC](https://casparcgforum.org/t/creating-loopic-html-template-with-imageloaders-how-to-address-another-image-to-load/5014/3 "2022-09-01T10:42:43Z")

</div>

Hello all,

I am having problems to format the datastring to a template.  
I want to send a cluster (with key- and values string) through an XML serializer in my Software.  
CasparCG responds with -No Error- ,but the dynamic texts (\_VAR1 and \_VAL1) do not update, the command:

CG 1-20 ADD 1 “DNW\_18xVAL-INLINE\_logo\_LEFT” 1 “[[[”\_VAR1",“DATA”],["\_VAL1",“12.3456”]]]"

Is there anyone who can help me?

---

<div class="post-metadata">

**Author:** ![didikunz](https://casparcgforum.org/user_avatar/casparcgforum.org/didikunz/32/7_2.png) [@didikunz](https://casparcgforum.org/u/didikunz)\
**Post date:** [September 1, 2022, 4:22pm UTC](https://casparcgforum.org/t/creating-loopic-html-template-with-imageloaders-how-to-address-another-image-to-load/5014/4 "2022-09-01T16:22:07Z")

</div>

You should escape the quotation marks `"` will become `\"` and usually the whole data is formatted as XML or JSON. Currently the template only gets `[[[` as data.

---

<div class="post-metadata">

**Author:** ![hans\_willemsen](https://casparcgforum.org/letter_avatar_proxy/v4/letter/h/e0b2c6/32.png) [@hans\_willemsen](https://casparcgforum.org/u/hans_willemsen)\
**Post date:** [September 1, 2022, 8:13pm UTC](https://casparcgforum.org/t/creating-loopic-html-template-with-imageloaders-how-to-address-another-image-to-load/5014/5 "2022-09-01T20:13:08Z")

</div>

Thanks Didi,

In the meantime I discover a workaround for me and programmed the data string without the serializer.  
It works fine and the url for the imageloaders should be in the form: “file:///C:/Caspar3.3/media/logo.png” in ‘full’ url-format.  
Thanks !

---

<div class="post-metadata">

**Author:** ![tombron](https://casparcgforum.org/letter_avatar_proxy/v4/letter/t/82dd89/32.png) [@tombron](https://casparcgforum.org/u/tombron)\
**Post date:** [August 25, 2023, 5:29pm UTC](https://casparcgforum.org/t/creating-loopic-html-template-with-imageloaders-how-to-address-another-image-to-load/5014/6 "2023-08-25T17:29:35Z")

</div>

Hi,  
Thought this might be the right place to ask this instead of opening a new thread,  
I’ve created a template in loopic (awesome product! love it!) with an image  
I’ve set the dynamic id of the Image to “flag”  
when I use casparcg client, I add the key “flag” with value “file://c:/myflag.png” but it doesn’t seem to affect the template, what would be the right way to approach this?

Just to clarify - text fields are updated without a problem using the same method through casparcg client

---

<div class="post-metadata">

**Author:** ![imare](https://casparcgforum.org/user_avatar/casparcgforum.org/imare/32/2139_2.png) [@imare](https://casparcgforum.org/u/imare)\
**Post date:** [September 4, 2023, 10:22am UTC](https://casparcgforum.org/t/creating-loopic-html-template-with-imageloaders-how-to-address-another-image-to-load/5014/7 "2023-09-04T10:22:46Z")

</div>

Do you see a broken image icon in the template or nothing happens at all?

---

<div class="post-metadata">

**Author:** ![tombron](https://casparcgforum.org/letter_avatar_proxy/v4/letter/t/82dd89/32.png) [@tombron](https://casparcgforum.org/u/tombron)\
**Post date:** [September 4, 2023, 2:56pm UTC](https://casparcgforum.org/t/creating-loopic-html-template-with-imageloaders-how-to-address-another-image-to-load/5014/8 "2023-09-04T14:56:02Z")

</div>

Hi,  
I was not aware, but turns out that when you import an image to loopic, it adds a layer to your composition, but it’s not an image layer,  
I had to delete this layer, and add an image layer with the same sizes/location

I couldn’t find a way to add an image layer and assign one of my imported images to it, there was only a way to add the built in place holders

it’s probably in the manual somewhere and I didn’t read it 🙂

Once i’ve added a normal image layer - casparcg was able to update images into it

---

<div class="post-metadata">

**Author:** ![EverywhereSean](https://casparcgforum.org/user_avatar/casparcgforum.org/everywheresean/32/1909_2.png) [@EverywhereSean](https://casparcgforum.org/u/EverywhereSean)\
**Post date:** [December 13, 2023, 7:29am UTC](https://casparcgforum.org/t/creating-loopic-html-template-with-imageloaders-how-to-address-another-image-to-load/5014/9 "2023-12-13T07:29:04Z")

</div>

I’m getting broken image icon in the template. I’ve tried different ways to try to link the images locally. I’ve done adding “file:///”, ", and copied the path into the value, and still results are the same. Is the latest version possibly broken for pulling local files? Because I can copy the image address link from the web and works just fine.

---

<div class="post-metadata">

**Author:** ![imare](https://casparcgforum.org/user_avatar/casparcgforum.org/imare/32/2139_2.png) [@imare](https://casparcgforum.org/u/imare)\
**Post date:** [December 13, 2023, 9:43am UTC](https://casparcgforum.org/t/creating-loopic-html-template-with-imageloaders-how-to-address-another-image-to-load/5014/10 "2023-12-13T09:43:04Z")

</div>

Could you please send your CasparCG log file?  
Edit: A very common mistake is using backslashes instead of slashes in the URL ([docs](https://docs.loopic.io/api/elements/image-loader-element/)).

---

<div class="post-metadata">

**Author:** ![warlockSK](https://casparcgforum.org/letter_avatar_proxy/v4/letter/w/7ea924/32.png) [@warlockSK](https://casparcgforum.org/u/warlockSK)\
**Post date:** [February 20, 2024, 10:33am UTC](https://casparcgforum.org/t/creating-loopic-html-template-with-imageloaders-how-to-address-another-image-to-load/5014/11 "2024-02-20T10:33:32Z")

</div>

> [@tombron](#):
>
> image layer

I fall also for this.

Pay attention, if you want to change from the CasparCG Client the image in a template, make sure that you add an image layer.  
When you add the image from “add resource”, the layer in the composition is not an image layer.

 ![2024-02-20_12-26-54](https://casparcgforum.org/uploads/default/original/2X/2/2fe5ce8158682fd9ff98a8fdfaa9dee65b987852.jpeg)

The command to load the template with a remote http image file looks like  
CG 1-20 ADD 1 “SN-TEMPLATE-IMG” 1 "\<componentData id="imag"\>\<data id="text" value="[http://192.xxx.xx.70/xxxxx/uploads/pictures/1708347189.png\“/\>\</componentData\>\</templateData\>”](http://192.xxx.xx.70/xxxxx/uploads/pictures/1708347189.png%5C%22/%3E%3C/componentData%3E%3C/templateData%3E%22)

thank you loopic!

---

<div class="post-metadata">

**Author:** ![warlockSK](https://casparcgforum.org/letter_avatar_proxy/v4/letter/w/7ea924/32.png) [@warlockSK](https://casparcgforum.org/u/warlockSK)\
**Post date:** [February 20, 2024, 10:34am UTC](https://casparcgforum.org/t/creating-loopic-html-template-with-imageloaders-how-to-address-another-image-to-load/5014/12 "2024-02-20T10:34:21Z")

</div>

![2024-02-20_12-27-58](https://casparcgforum.org/uploads/default/original/2X/9/91ca50b3d23eb907caf497d7c6fb4def529b4ab9.jpeg)
