# Accessing images in Image Manager through scripting

**URL:** <https://forum.inductiveautomation.com/t/accessing-images-in-image-manager-through-scripting/38025>\
**Category:** Ignition\
**Created:** [August 24, 2020, 4:08pm UTC](https://forum.inductiveautomation.com/t/accessing-images-in-image-manager-through-scripting/38025 "2020-08-24T16:08:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![yburdak](https://avatars.discourse-cdn.com/v4/letter/y/ccd318/32.png) [@yburdak](https://forum.inductiveautomation.com/u/yburdak)\
**Post date:** [August 24, 2020, 4:08pm UTC](https://forum.inductiveautomation.com/t/accessing-images-in-image-manager-through-scripting/38025/1 "2020-08-24T16:08:55Z")

</div>

Is there any way to access the images in the Image Manager through scripting at runtime? Currently I can access the images if they are on a shared drive “\\shared drive\image.extension” or by storing the raw bytes for an image in a Python list “byteList = [byte0, byte1, …, byteN]”. Through some searching I was able to find the following information in JavaDocs but not sure how to actually access and instance of the ImageManager.  
[http://files.inductiveautomation.com/sdk/javadoc/ignition79/795/com/inductiveautomation/ignition/gateway/images/ImageManager.html](http://files.inductiveautomation.com/sdk/javadoc/ignition79/795/com/inductiveautomation/ignition/gateway/images/ImageManager.html)  
I am not a Java developer so some of the terminology might be off.

---

<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 24, 2020, 4:18pm UTC](https://forum.inductiveautomation.com/t/accessing-images-in-image-manager-through-scripting/38025/2 "2020-08-24T16:18:04Z")

</div>

The first question is, what does 'accessing images' mean? Reading the data, to display on a page? Adding, removing, deleting? Also, what scope do you want to access the images in? If it's from the client/designer, there are a lot more hurdles than on the gateway.

This thread has some useful information:

> [@Image Management Tool](http://forum.inductiveautomation.com/t/image-management-tool/37558):
>
> Does anyone have an example of using the Image Management Tool to upload images from a client? Currently using version 7.9. I found the post below, but have not been even close to successful in getting it to work. [[Image Management Tool Query](http://forum.inductiveautomation.com/t/image-management-tool-query/32652)] Thanks!

Oh, and let me say up front this time - doing anything where you have to interact with the API will not be supported by support. That's not to say that it's actually bad, but careless use of internal methods could lead to unintended consequences.

---

<div class="post-metadata">

**Author:** ![yburdak](https://avatars.discourse-cdn.com/v4/letter/y/ccd318/32.png) [@yburdak](https://forum.inductiveautomation.com/u/yburdak)\
**Post date:** [August 24, 2020, 6:16pm UTC](https://forum.inductiveautomation.com/t/accessing-images-in-image-manager-through-scripting/38025/3 "2020-08-24T18:16:40Z")

</div>

Sorry for the confusion. I need to display it on a custom popup in Vision. I am not trying to manipulate the image in any way. Attached I have the script I am currently using. I would like to use an image that I uploaded to the Image Manager in the same manner. This is to avoid any file share permissions issues that we run into sometimes. I believe I will need to access it from the client unless there is a way to pass the image to a client from the gateway after the gateway retrieves the image.

[Alert.py](https://forum.inductiveautomation.com/uploads/short-url/oxxjIAon1irHr1y8JyQyUIR3RQF.py) (3.1 KB)

---

<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 24, 2020, 7:03pm UTC](https://forum.inductiveautomation.com/t/accessing-images-in-image-manager-through-scripting/38025/4 "2020-08-24T19:03:16Z")

</div>

If you just need to display an image from image management, then all you need is the image component. Just update the path property to whatever the path is to your image in image management:  
[https://docs.inductiveautomation.com/display/DOC80/Vision+-+Image](https://docs.inductiveautomation.com/display/DOC80/Vision+-+Image)

---

<div class="post-metadata">

**Author:** ![yburdak](https://avatars.discourse-cdn.com/v4/letter/y/ccd318/32.png) [@yburdak](https://forum.inductiveautomation.com/u/yburdak)\
**Post date:** [September 3, 2020, 2:21pm UTC](https://forum.inductiveautomation.com/t/accessing-images-in-image-manager-through-scripting/38025/5 "2020-09-03T14:21:55Z")

</div>

That worked. I was able to import and instantiate the PMIImage component instead of PMILabel in my script and use its setPath method to browse and display the images from Image Management.  
Thank you for your help.
