# Image Component: Update image periodically

**URL:** <https://forum.inductiveautomation.com/t/image-component-update-image-periodically/58548>\
**Category:** Ignition\
**Tags:** ignition80, vision\
**Created:** [April 18, 2022, 1:40pm UTC](https://forum.inductiveautomation.com/t/image-component-update-image-periodically/58548 "2022-04-18T13:40:05Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jacob\_Sanchez](https://avatars.discourse-cdn.com/v4/letter/j/9fc29f/32.png) [@Jacob\_Sanchez](https://forum.inductiveautomation.com/u/Jacob_Sanchez)\
**Post date:** [April 18, 2022, 1:40pm UTC](https://forum.inductiveautomation.com/t/image-component-update-image-periodically/58548/1 "2022-04-18T13:40:06Z")

</div>

I have an image component displaying a bmp on the clients local filesystem, this bmp file will be re-written every x seconds updating its contents (from an external program). I’m stumped on how to re-load the image from the filesystem periodically so that the vision window will display an up to date image.

---

<div class="post-metadata">

**Author:** ![Jacob\_Sanchez](https://avatars.discourse-cdn.com/v4/letter/j/9fc29f/32.png) [@Jacob\_Sanchez](https://forum.inductiveautomation.com/u/Jacob_Sanchez)\
**Post date:** [April 18, 2022, 2:26pm UTC](https://forum.inductiveautomation.com/t/image-component-update-image-periodically/58548/2 "2022-04-18T14:26:39Z")

</div>

While i have not found a solution to this specific issue, i have been able to utilize the IP camera viewer component as the initial source for the image I’m trying to update is pulled from http.

---

<div class="post-metadata">

**Author:** ![ajdewhirst1](https://avatars.discourse-cdn.com/v4/letter/a/bbe5ce/32.png) [@ajdewhirst1](https://forum.inductiveautomation.com/u/ajdewhirst1)\
**Post date:** [April 18, 2022, 2:54pm UTC](https://forum.inductiveautomation.com/t/image-component-update-image-periodically/58548/3 "2022-04-18T14:54:20Z")

</div>

Maybe try a script using system.db.refresh targeting the “path” property of the image component.  
Fire a property changed script using a custom property on the window bound to dateExtract(now(5000), ‘second’). Alter the 5000 value to get the polling rate you require.

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [April 18, 2022, 3:04pm UTC](https://forum.inductiveautomation.com/t/image-component-update-image-periodically/58548/4 "2022-04-18T15:04:25Z")

</div>

If using the Image component, you should set the `Use Cache` property to false. If true, the client will cache the image and will most likely not update the image when it is overwritten since it would have the same file name. Making the `Use Cache` false should force the image to reload from the source. You would probably need a timer script to toggle the image path every X seconds to trigger a path property change event…

---

<div class="post-metadata">

**Author:** ![Jacob\_Sanchez](https://avatars.discourse-cdn.com/v4/letter/j/9fc29f/32.png) [@Jacob\_Sanchez](https://forum.inductiveautomation.com/u/Jacob_Sanchez)\
**Post date:** [April 18, 2022, 3:09pm UTC](https://forum.inductiveautomation.com/t/image-component-update-image-periodically/58548/5 "2022-04-18T15:09:57Z")

</div>

Unfortunately with this i get “WARN com.inductiveautomation.factorypmi.application.components.PMIImage - system.db.refresh() was unable to find a refresh-compatible property binding on Image.path”

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [April 18, 2022, 3:12pm UTC](https://forum.inductiveautomation.com/t/image-component-update-image-periodically/58548/6 "2022-04-18T15:12:59Z")

</div>

> [@Jacob\_Sanchez](#):
>
> “WARN com.inductiveautomation.factorypmi.application.components.PMIImage - system.db.refresh() was

`system.db.refresh` only works for properties that have bindings to a db query  
Turns out it does work for any property binding as noted below

---

<div class="post-metadata">

**Author:** ![Jacob\_Sanchez](https://avatars.discourse-cdn.com/v4/letter/j/9fc29f/32.png) [@Jacob\_Sanchez](https://forum.inductiveautomation.com/u/Jacob_Sanchez)\
**Post date:** [April 18, 2022, 3:13pm UTC](https://forum.inductiveautomation.com/t/image-component-update-image-periodically/58548/7 "2022-04-18T15:13:57Z")

</div>

I had previously noted the useCache property and had it set to false. I did a simple test script on a button that changed the path to ‘’, then back to the actual path and that is working great.

---

<div class="post-metadata">

**Author:** ![ajdewhirst1](https://avatars.discourse-cdn.com/v4/letter/a/bbe5ce/32.png) [@ajdewhirst1](https://forum.inductiveautomation.com/u/ajdewhirst1)\
**Post date:** [April 18, 2022, 3:25pm UTC](https://forum.inductiveautomation.com/t/image-component-update-image-periodically/58548/8 "2022-04-18T15:25:53Z")

</div>

According to the user manual:

“Even though the function includes"db” in the name, the function can update all types of Vision component bindings, including Property and Expression bindings"

---

<div class="post-metadata">

**Author:** ![Jacob\_Sanchez](https://avatars.discourse-cdn.com/v4/letter/j/9fc29f/32.png) [@Jacob\_Sanchez](https://forum.inductiveautomation.com/u/Jacob_Sanchez)\
**Post date:** [April 18, 2022, 3:56pm UTC](https://forum.inductiveautomation.com/t/image-component-update-image-periodically/58548/9 "2022-04-18T15:56:50Z")

</div>

I just realized that i wasn’t using a property binding on path, i just had the path to the image static in the path property, which would probably explain why it couldn’t find the binding. If i have time i’ll give that a go again (i removed everything from the project that was supporting this) and see if it works.

---

<div class="post-metadata">

**Author:** ![ajdewhirst1](https://avatars.discourse-cdn.com/v4/letter/a/bbe5ce/32.png) [@ajdewhirst1](https://forum.inductiveautomation.com/u/ajdewhirst1)\
**Post date:** [April 18, 2022, 5:24pm UTC](https://forum.inductiveautomation.com/t/image-component-update-image-periodically/58548/10 "2022-04-18T17:24:06Z")

</div>

That occurred to me too. Not sure how it will handle a path binding rather than a static path string.  
Good luck! 🙂
