# Show an image from external location

**URL:** <https://forum.inductiveautomation.com/t/show-an-image-from-external-location/12172>\
**Category:** General Discussion\
**Created:** [September 26, 2016, 10:35pm UTC](https://forum.inductiveautomation.com/t/show-an-image-from-external-location/12172 "2016-09-26T22:35:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![htrujillo](https://avatars.discourse-cdn.com/v4/letter/h/bc8723/32.png) [@htrujillo](https://forum.inductiveautomation.com/u/htrujillo)\
**Post date:** [September 26, 2016, 10:35pm UTC](https://forum.inductiveautomation.com/t/show-an-image-from-external-location/12172/1 "2016-09-26T22:35:24Z")

</div>

Hi:

I have a folder with dynamical photos, this location can be browse with “File explorer view”, but I can’t open an image.

I don’t want to use “Image Management” from ignition.

Is it possible open an image?

Thanks for your help.

---

<div class="post-metadata">

**Author:** ![AlThePal](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/althepal/32/3603_2.png) [@AlThePal](https://forum.inductiveautomation.com/u/AlThePal)\
**Post date:** [October 18, 2016, 8:29pm UTC](https://forum.inductiveautomation.com/t/show-an-image-from-external-location/12172/2 "2016-10-18T20:29:24Z")

</div>

You can display an image using the Image control by setting the ‘Image Path’ property to ‘file://’ followed by a valid path to the image file. Remember that this path has to be valid for every client you are trying to access the picture from.

---

<div class="post-metadata">

**Author:** ![htrujillo](https://avatars.discourse-cdn.com/v4/letter/h/bc8723/32.png) [@htrujillo](https://forum.inductiveautomation.com/u/htrujillo)\
**Post date:** [October 20, 2016, 10:26pm UTC](https://forum.inductiveautomation.com/t/show-an-image-from-external-location/12172/3 "2016-10-20T22:26:31Z")

</div>

it works…!!!

thanks AlThePal

this is the Code.

Component Scripting (File Explorer)  
event MouseClicked

event.source.parent.getComponent(‘vFoto’).text = event.source.selectedPath

event.source.parent.getComponent(‘vFotoImg’).path = “file:///” + event.source.parent.getComponent(‘vFoto’).text

---

<div class="post-metadata">

**Author:** ![pylkov.s](https://avatars.discourse-cdn.com/v4/letter/p/7993a0/32.png) [@pylkov.s](https://forum.inductiveautomation.com/u/pylkov.s)\
**Post date:** [August 21, 2017, 7:01pm UTC](https://forum.inductiveautomation.com/t/show-an-image-from-external-location/12172/4 "2017-08-21T19:01:57Z")

</div>

Hello. Why I can not display an image? We want display images from an remote cameras.

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/f/feaa52d1bd902611b5d3c6656cfa8b7eb63be623.jpg)

P.S. We don’t want display video from camers. Program “motion” save scrinshots on every motions and this scrinshots need to display.  
Sorry for english, we are russian.

---

<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:** [August 23, 2017, 3:50pm UTC](https://forum.inductiveautomation.com/t/show-an-image-from-external-location/12172/5 "2017-08-23T15:50:54Z")

</div>

> [@AlThePal](#):
>
> Remember that this path has to be valid for every client you are trying to access the picture from.

@pylkov.s  
The path isn't valid because your designer, running on the local Windows system, doesn't know what to do with the `/home/` path. You would need to use a multiple operating system compatible path, or another workaround - such as storing and displaying images from the database. See [this post](http://forum.inductiveautomation.com/t/updating-image-component-based-off-of-newest-image-in-a-directory/14972) for one example.

---

<div class="post-metadata">

**Author:** ![cmaynes](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmaynes/32/6852_2.png) [@cmaynes](https://forum.inductiveautomation.com/u/cmaynes)\
**Post date:** [May 22, 2019, 7:09pm UTC](https://forum.inductiveautomation.com/t/show-an-image-from-external-location/12172/6 "2019-05-22T19:09:30Z")

</div>

For those interested…you can use java libraries to handle this and show a local image in a label.

```auto
from javax.imageio import ImageIO
from java.io import File
from javax.swing import ImageIcon

filepath = r"C:\Users\cmaynes\Desktop\save_white_24.png"
ofile = File(filepath)
oimage = ImageIO.read(ofile)
lbl_comp = event.source.parent.getComponent('Label 1')
lbl_comp.setIcon(ImageIcon(oimage))

```
