# Display or Save an Image file from URL

**URL:** <https://forum.inductiveautomation.com/t/display-or-save-an-image-file-from-url/90440>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [May 15, 2024, 2:52pm UTC](https://forum.inductiveautomation.com/t/display-or-save-an-image-file-from-url/90440 "2024-05-15T14:52:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![JayR](https://avatars.discourse-cdn.com/v4/letter/j/e495f1/32.png) [@JayR](https://forum.inductiveautomation.com/u/JayR)\
**Post date:** [May 15, 2024, 2:52pm UTC](https://forum.inductiveautomation.com/t/display-or-save-an-image-file-from-url/90440/1 "2024-05-15T14:52:05Z")

</div>

Hi All,

How can I display or save an image file from the URL that returns an Image. I'm using system.net.httpClient function.

Thanks in advance.

---

<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:** [May 15, 2024, 3:00pm UTC](https://forum.inductiveautomation.com/t/display-or-save-an-image-file-from-url/90440/2 "2024-05-15T15:00:55Z")

</div>

Is there a reason you cannot put the URL itself in an Image Component? Let the browser display it?

If there is such a reason, there are non-simple methods that can be used:

- Convert the image content into a **data URL** and supply that to your Image Component.

- Save the image content in a file in your gateway, and use WebDev to expose that file at a URL, which you then feed to your Image Component.

- Save the image content as a "blob" in your database, and use WebDev or my free Blob Server module to expose that blob at a URL, which you then feed to your Image Component.

---

<div class="post-metadata">

**Author:** ![JayR](https://avatars.discourse-cdn.com/v4/letter/j/e495f1/32.png) [@JayR](https://forum.inductiveautomation.com/u/JayR)\
**Post date:** [May 15, 2024, 3:31pm UTC](https://forum.inductiveautomation.com/t/display-or-save-an-image-file-from-url/90440/3 "2024-05-15T15:31:21Z")

</div>

Hi pturmel,

After I used system.net.httpClient from URL1 it returns another URL2, for me to use and add headerValues = myAuthentication, then from URL2 it returns from below image:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/7/d7f3cf1e04c13552fec320c6864f3fdcce73b3b8.png)

---

<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:** [May 15, 2024, 3:39pm UTC](https://forum.inductiveautomation.com/t/display-or-save-an-image-file-from-url/90440/4 "2024-05-15T15:39:11Z")

</div>

That's the binary image content, as one would expect. You need to save that (as bytes), or encode into a data URL.

> [@Perspective: Base64 Image into Table](https://forum.inductiveautomation.com/t/perspective-base64-image-into-table/62684/3):
>
> If you know the filetype of the base64 data, you could prefix it to make a data URI, which you would be able to directly use as the source property of an image component:
