Ignition image library folder location

Hello there,

I was wondering if anyone here knows where the default folder of the image manager lives at.

I’ve looked everywhere possible, cannot seem to find it.

The reason for this is because I have a 3rd party application that writes images, and I would like to display it dynamically on ignition… but the only way to do that is to manually add it to the image manager and then show it on the screen.

Any help is appreciated.

1 Like

Images are stored in the internal database under the IMAGES table.

Don’t checkout the internal database at:

1 Like

Please note, however, that modifying the internal database (or even querying it) remotely is not recommended, nor is it officially supported. If you want to view external images in an Ignition client, the best option is to store them into a database as Binary Large OBjects (BLOBs) and return them with a query.

This piece of code can be added to the Paintable Canvas’ component’s repaint() method to display a BLOB live:

g = event.graphics
name = event.source.ImageName

cachedName = event.source.getClientProperty("img-bytes-cached-name")
bytes = event.source.getClientProperty("img-bytes-cached")
if name != cachedName or not bytes:
	# Image not cached - load from database
	bytes = system.db.runScalarQuery("SELECT data FROM image_test WHERE imgname='%s'" % name)
	event.source.putClientProperty("img-bytes-cached", bytes)
	event.source.putClientProperty("img-bytes-cached-name", name)

if bytes:
	from javax.imageio import ImageIO
	from java.io import ByteArrayInputStream
	image = ImageIO.read(ByteArrayInputStream(bytes))
	g.drawImage(image, 0, 0, event.width, event.height, event.source)
1 Like

On that note… is there a way to store audio files (.wav) in a database to be played on clients?

Currently I can play audio files but each client needs network folder access and there isn’t a file server on the network to facilitate this.

There is another good way to store images – in the project itself in a client tag. The images are stored in a client tag from within the Ignition designer which automatically saves and propagates the images to the client. This is nice because no database is needed and the images stay with your project if you ever export your project.

I made a very useful free tool with instructions that helps you use this approach in the blog post at this link: http://nickmudge.info/post/storing-images-in-ignition-projects

You could use the same approach – save your wave file data in a client tag (loaded from within the Ignition designer). That way you do not need a file server or database.



How will it affect the performance if we add more and more images ? I did go through your instructions on how we can do it using Client tag. I am planning to use it with our QA Module to store store every image they capture while testing. They might need to keep that data for at least 2 years before we archive it. In a day I can see anywhere between 20 -50 pictures taken. Will this cause any slowness or other issues ?

This won’t work with client tags. Client tags are initialized on client startup from the data that was in them in the designer the last time it (the designer) saved the project. Client tags are in-memory in the client, and changes to the contents are lost when the client closes.

Nick’s recommendation is for project-specific static images.