Make Ignition Projects More Portable By Saving Images

Normally images in Ignition are stored in the Ignition gateway, not in Ignition projects. This makes it easy to reuse the same images in multiple projects, but it makes projects less portable because images used in projects are not exported with projects.

So you might add your own special icons and images to Ignition and use them in your project. Later you export your project and send the project export file to a colleague. Your colleague imports the project into a different Ignition server and the images are missing. Ah man, too bad. I wrote a blog post that shows how to solve this problem so that your images stay with your exported projects.

Check out the blog post here: nickmudge.info/post/storing-imag … n-projects

Best,

Hi Nick,

Awesome concept, just came across your blog post now and tried it out in my project.

How are the images actually stored in the client tag?

I have my Gateway running on Debian, and my development laptop is running Windows.
I opened Designer on my Windows laptop and added an image through the template interface. I could then create an image instance on my designer and see the image OK.

When i published the project and opened a client the image template showed an error.
Is this because the client tag “project_images” is scoped to client, and therefore seperate from designer and client? Should the images dataset tag just be a Global Gateway scoped tag in order for it to be available across both Designer and all Ignition clients?

Cheers

Hi Richard,

That is great. No, the tag should just be a client tag. I’m not sure why it isn’t working. Can you make a screenshot of the error or copy and paste the full error message? I want to see the full error message. I want to get it fully resolved so it is working for you.

Data put in a client tag in the designer will also be in the same client tag in the client.

Best,

Hi,

I just did another quick test and got it working. But i had to create a tag outside of the “Client” scope.
I made another dataset tag “project_images” in the main tag directory. Then i changed the tag path in your two templates, in the custom property and the “drawImage” script. So now it works in both Designer and Client!

But yea awesome templates!

Just as an icing on top question, would there be any way to get the images to be resizable? Uploading an image that matches the exact resolution you require would be tricky. And it could also be useful to take advantage of Ignitions layout constraints by having the image stretch with the root container its in.

Hi Richard,

I am glad you got it working but using a memory tag defeats the purpose of the templates. The purpose of the templates is to provide a way to store images within a project so that when you export the project the images come with it and you can import the project into a different server and the images will be there and work.

Memory tags are not part of a project so if you export the project the images won’t come with it. But client tags are part of a project and do come with an exported project.

If you are not going to use a client tag then you might as well use the regular image management in Ignition and use the Image component to display your images, which provides builtin functionality for resizing templates.

It is possible to resize images with the templates that I made but currently it takes a little java programming. You can make various google searches for how to resize images in Java to find out what code is required to do that.

I would really appreciate it if you would send me the error message you are getting so that I can fix the problem you are having with using a client tag.

Thanks,

Ah ok i see. Well I had another look at it.
I uploaded an image via a Client and got the image displaying fine in the client.
And inside the designer runtime i could do the same.
So there isn’t any errors with the template. The only thing i was saying was images uploaded via the designer runtime are not accessible when using a client.
But i believe thats just due to how Client tags work, they are isolated between client instances, and Ignition gateway treats a designer as a separate client.

https://docs.inductiveautomation.com/display/DOC/System,+Client,+and+Diagnostic+Tags

Hi Richard,

Images uploaded via the designer runtime are only accessible in clients if you save the project.

The reason this works is because the saved values of client tags in the designer become the default values of those client tags in clients. But you have to save the project for this to work.

If you are experiencing something else then I need more information, like what version of Ignition you are using.

Did you get a chance to see the video? It is at this link: youtu.be/bEh1PewEeww

Best,

Ah ok, sorry its working just like that, so likely no problem on your end. Thanks

Good afternoon nmudge,

Do you have an updated link that shows you how you attach images to the project? The blog post you linked to doesn’t seem to be available any longer.

Thanks,

Hi I have brought his website back from archive.
Check this link…http://web-old.archive.org/web/20190714023416/http://nickmudge.info/post/storing-images-in-ignition-projects

Thanks.