The title says it all, is there a way to programmatically upload images to Ignition's Image Management Folder, instead of manually doing it via the designer?
Or an alternative:
I'm working with mdia here, so let me step in a bit.
What you posted is getting closer, but a little more detail on what we are trying to accomplish might be useful. We are doing automated deployments, and we are able to push arbitrary files to the gateway during that process, so we can get the images onto the gateway server file system that way. At the end of our deployment pipeline we have a gateway script that is activated to perform updates.
Unless I'm mistaken we need to get an instance of an ImageManager object in gateway scope that can then be used to import the images from the local gateway server file system images into the gateway image store.
My question is how can we get an instance of ImageManager in gateway scope?
There's still some scope complexities you may need to sort out, but you're on the right track at least in current Ignition versions. I'm guessing/hoping there are going to be some updates in 8.3 as they move to a more git friendly setup for the configurations. But IA would have to comment on what the future holds.
This is essentially the function you need.
This forum post was most of my reference for doing the opposite of what you did(saving images), but should hopefully help get the Gateway and Image management.
Thank you! That looks like exactly what I need.
Becoming more source control friendly would be very welcome. We're having to do a lot of gymnastics to be able to deploy UDT changes and things like that. I'm guessing that as soon as we have all the workarounds in place they'll announce built in solutions
I'll have to look into the details of how it works, but there's also a mechanism for ingress of images on disk that we use ourselves for the builtin icons. That may only run on brand new gateways, though.