I am currently experimenting with the IFrame and had a question regarding displaying local images through HTML. My HTML I am putting into the src is the following:
I get a broken image link but if I were to save that as an HTML file and open it it would find and display the image.
Iâve gotten a web linked image to work so I know the source should be all set up correctly, my question is is Ignition able to access local images at all or am I just trying to access it incorrectly.
The short answer is no.
Browsers wonât allow you to view local file resources and network file resources at the same time, for security reasons.
You need to use some webserver to host the files. This doesnât have to be Ignition, but should be on the same host (otherwise you get cross-domain resource issues from browsers).
The easiest solution is to use the Webdev module. You can host specific files or âmountâ certain folders so that Ignitionâs webserver will make them available over the network: Web Dev - Ignition User Manual 8.1 - Ignition Documentation
Thank you, the model that is currently being used to do this task is using a python webserver, and if I poach just the image by replacing the source with a link like this: âhttp://localhost:XXXX/test/static/ref_212.jpgâ I am able to get the image to show up in my perspective designer session, and after a little bit it shows up on the client. Iâve never used anything like this before haha but thanks to your insight I think I can just strip down the webserver to just hold the images as everything else worked except that.
Not the most efficient way probably, but was told for this implementation theyâd prefer not to use the webdev module so this is a start.