# Update image on event

**URL:** <https://discourse.nodered.org/t/update-image-on-event/18360>\
**Category:** Dashboard\
**Created:** [24 November 2019 18:08 UTC](https://discourse.nodered.org/t/update-image-on-event/18360 "2019-11-24T18:08:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![newbow](https://avatars.discourse-cdn.com/v4/letter/n/f1d935/32.png) [@newbow](https://discourse.nodered.org/u/newbow)\
**Post date:** [24 November 2019 18:08 UTC](https://discourse.nodered.org/t/update-image-on-event/18360/1 "2019-11-24T18:08:12Z")

</div>

Hi there,

I need to display an image in dashboard.  
Got that part working by using a _ **template** _ node and simple html.

The problem is, that the file gets updated once in a while (overwritten with a newer version), as it's the output of a opencv script which is executed using the _ **exec** _ node in node-red.  
I want the dashboard to reload only that particular cap.jpg once it has been altered. I do not want to constantly pull the image even though it hasn't been changed.

Do you guys have a hint for me? It has to be a offline solution though, no Internet!  
The _ **exec** _ node returns a '0' on successful execution so we could use this as trigger.  
I am very new to javascript and html, so I am not sure how to implement an event that only partially refreshes the dashboard on a defined event.

A hope it's clear what I want to achieve. I have been searching the web for hours but have yet to find a solution to my issue.

thanks 🙂

Newbow
