# \[Perspective\] Auto Refresh Hosted Image

**URL:** <https://forum.inductiveautomation.com/t/perspective-auto-refresh-hosted-image/101009>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [January 16, 2025, 8:41pm UTC](https://forum.inductiveautomation.com/t/perspective-auto-refresh-hosted-image/101009 "2025-01-16T20:41:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![byrcharl](https://avatars.discourse-cdn.com/v4/letter/b/e79b87/32.png) [@byrcharl](https://forum.inductiveautomation.com/u/byrcharl)\
**Post date:** [January 16, 2025, 8:41pm UTC](https://forum.inductiveautomation.com/t/perspective-auto-refresh-hosted-image/101009/1 "2025-01-16T20:41:59Z")

</div>

I have a system where I don't have access to OPC, but I want to host all the C-more EA9 HMI screens on an Ignition screen. I'm using an image component in Perspective to load the images via a URL, like `http://IP-ADDRESS/3.jpg`.

The issue I'm facing is that there's no way to refresh the image. The C-more will generate the latest screen when a GET request is called, but I have to manually refresh the page to get the updated image. I've tried using a unique URL and the `refreshBinding` function, but neither worked. When using a `?` in the link, it returns an encoded string instead of the image.

The refresh rate doesn't need to be high—every 5 to 10 seconds would be sufficient to display the latest faults across all devices.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [January 16, 2025, 11:15pm UTC](https://forum.inductiveautomation.com/t/perspective-auto-refresh-hosted-image/101009/2 "2025-01-16T23:15:22Z")

</div>

You could fetch the data with scripting (`system.net.httpClient`), then render it to a data URI and put that into the actual Perspective page. Not super efficient, and if you have many clients you should batch the work so that the gateway only hits the HMI(s) once, but it should work, since it'll be a fresh HTTP call each time.

---

<div class="post-metadata">

**Author:** ![David\_Stone](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/david_stone/32/79749_2.png) [@David\_Stone](https://forum.inductiveautomation.com/u/David_Stone)\
**Post date:** [January 16, 2025, 11:45pm UTC](https://forum.inductiveautomation.com/t/perspective-auto-refresh-hosted-image/101009/3 "2025-01-16T23:45:43Z")

</div>

On this stream, I have done this with a scheduled script on the gateway grabbing the image once every 5 seconds, base64 encoding it and throwing it in a memory tag, then the binding of the image item bound to this will change if the tag changes. Bear in mind that the images will be quite small as they are coming from very small HMI resolutions, so this will not be the worst performance hog.  
This solution effectively caches the image in the gateway and lets the server organise the updating and sync.
