# IFrame with Image and Text in HTML

**URL:** <https://forum.inductiveautomation.com/t/iframe-with-image-and-text-in-html/62561>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [August 1, 2022, 6:31pm UTC](https://forum.inductiveautomation.com/t/iframe-with-image-and-text-in-html/62561 "2022-08-01T18:31:57Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Samg23](https://avatars.discourse-cdn.com/v4/letter/s/df788c/32.png) [@Samg23](https://forum.inductiveautomation.com/u/Samg23)\
**Post date:** [August 1, 2022, 6:31pm UTC](https://forum.inductiveautomation.com/t/iframe-with-image-and-text-in-html/62561/1 "2022-08-01T18:31:57Z")

</div>

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:

```auto
data: text/html, <BODY><H1> <CENTER><IMG src="C:\test\static\ref_212.jpg"></CENTER></H1> <P align=left> <P align=left> <P align=left> <TABLE id=editnumber cellSpacing=2 cols=2 cellPadding=1 width=107 border=4> <TBODY> <TR> <TD>Edit </TD> <TD>621</TD></TR></TBODY></TABLE></P> <P><BR></P> 

```

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.

Thank you in advance!

---

<div class="post-metadata">

**Author:** ![zacht](https://avatars.discourse-cdn.com/v4/letter/z/ea5d25/32.png) [@zacht](https://forum.inductiveautomation.com/u/zacht)\
**Post date:** [August 1, 2022, 6:35pm UTC](https://forum.inductiveautomation.com/t/iframe-with-image-and-text-in-html/62561/2 "2022-08-01T18:35:20Z")

</div>

> [@Samg23](#):
>
> 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.

Everything in Perspective is run on the Gateway computer. If that file exists on the client computer, this won't work, full stop.

---

<div class="post-metadata">

**Author:** ![Samg23](https://avatars.discourse-cdn.com/v4/letter/s/df788c/32.png) [@Samg23](https://forum.inductiveautomation.com/u/Samg23)\
**Post date:** [August 1, 2022, 6:36pm UTC](https://forum.inductiveautomation.com/t/iframe-with-image-and-text-in-html/62561/3 "2022-08-01T18:36:51Z")

</div>

Gotcha, if I were to move those images to somewhere within the gateway would I be able to access them?

---

<div class="post-metadata">

**Author:** ![zacht](https://avatars.discourse-cdn.com/v4/letter/z/ea5d25/32.png) [@zacht](https://forum.inductiveautomation.com/u/zacht)\
**Post date:** [August 1, 2022, 6:37pm UTC](https://forum.inductiveautomation.com/t/iframe-with-image-and-text-in-html/62561/4 "2022-08-01T18:37:42Z")

</div>

My best answer is maybe. Hopefully someone more familiar with this component will come along to give a better answer. I would try it and see.

---

<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 1, 2022, 8:19pm UTC](https://forum.inductiveautomation.com/t/iframe-with-image-and-text-in-html/62561/5 "2022-08-01T20:19:56Z")

</div>

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](https://docs.inductiveautomation.com/display/DOC81/Web+Dev#WebDev-Resources)

---

<div class="post-metadata">

**Author:** ![Samg23](https://avatars.discourse-cdn.com/v4/letter/s/df788c/32.png) [@Samg23](https://forum.inductiveautomation.com/u/Samg23)\
**Post date:** [August 1, 2022, 8:34pm UTC](https://forum.inductiveautomation.com/t/iframe-with-image-and-text-in-html/62561/6 "2022-08-01T20:34:53Z")

</div>

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](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.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [August 1, 2022, 8:47pm UTC](https://forum.inductiveautomation.com/t/iframe-with-image-and-text-in-html/62561/7 "2022-08-01T20:47:17Z")

</div>

> [@paul-griffith](#):
>
> The **easiest** solution

What? No way that is easier than my [Blob Server Module](https://forum.inductiveautomation.com/t/automation-professionals-blob-server-module/57970).

---

<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 1, 2022, 8:56pm UTC](https://forum.inductiveautomation.com/t/iframe-with-image-and-text-in-html/62561/8 "2022-08-01T20:56:44Z")

</div>

Hey, I’ve been on vacation for three weeks, and now you expect me to remember third party modules too? I barely remember all the first party ones 🙂

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [August 1, 2022, 8:59pm UTC](https://forum.inductiveautomation.com/t/iframe-with-image-and-text-in-html/62561/9 "2022-08-01T20:59:42Z")

</div>

> [@paul-griffith](#):
>
> you expect me to remember third party modules

If they're mine, of course!
