# View Images from Database

**URL:** <https://forum.inductiveautomation.com/t/view-images-from-database/22626>\
**Category:** Ignition Early Access\
**Created:** [February 15, 2019, 9:52pm UTC](https://forum.inductiveautomation.com/t/view-images-from-database/22626 "2019-02-15T21:52:39Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![jpark](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@jpark](https://forum.inductiveautomation.com/u/jpark)\
**Post date:** [February 16, 2019, 6:06pm UTC](https://forum.inductiveautomation.com/t/view-images-from-database/22626/5 "2019-02-16T18:06:27Z")

</div>

You can create a named query that brings back the image bytes. If you are using MySQL, convert it to base64 in the query with TO\_BASE64(ImageData).

Bind the source property of the perspective image component to the named query.

Do the following script transform:

```auto
b64Image = "data:imagef;base64,%s"%value
	
return b64Image

```

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

---

_[View the full topic](https://forum.inductiveautomation.com/t/view-images-from-database/22626)._
