# How to Get image from database and displayed in image viewer

**URL:** <https://forum.inductiveautomation.com/t/how-to-get-image-from-database-and-displayed-in-image-viewer/95837>\
**Category:** Ignition\
**Created:** [September 11, 2024, 9:55am UTC](https://forum.inductiveautomation.com/t/how-to-get-image-from-database-and-displayed-in-image-viewer/95837 "2024-09-11T09:55:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Farheen\_Qureshi](https://avatars.discourse-cdn.com/v4/letter/f/7ba0ec/32.png) [@Farheen\_Qureshi](https://forum.inductiveautomation.com/u/Farheen_Qureshi)\
**Post date:** [September 11, 2024, 9:55am UTC](https://forum.inductiveautomation.com/t/how-to-get-image-from-database-and-displayed-in-image-viewer/95837/1 "2024-09-11T09:55:43Z")

</div>

I am using MSSQL and trying to get image from database

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/1/e1ba03ffa8e4044254c79edaf8f5a33e86de6b0f.png)

i have done in this way but it is not displaying in image viewer what to do can somebody help me

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/0/e0dfd0013fa134da1f70196cec0b148e29805626.png)

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [September 11, 2024, 10:03am UTC](https://forum.inductiveautomation.com/t/how-to-get-image-from-database-and-displayed-in-image-viewer/95837/2 "2024-09-11T10:03:21Z")

</div>

You are pasting a dataset into it. you will have to get the the value from out the dataset.  
`{value}[0,0]` (i think, I usually set the return format to json, so not sure)

**Note** : This method will not work if you images are to big. If its to big you will have to use something else like this:

> [@Automation Professionals' Blob Server Module](https://forum.inductiveautomation.com/t/automation-professionals-blob-server-module/57970):
>
> Automation Professionals is pleased to announce an alpha release of its new Blob Server Module. Available only for Ignition v8.1, here. The Blob Server Module provides a simple way to deliver images, PDF files, or other binary content from a database to your Perspective clients or other web applications. Without needing the WebDev module. All you need is a Named Query that has appropriate security settings and returns a single row with two columns: Content, and ContentType. Modest documentati…

---

<div class="post-metadata">

**Author:** ![Farheen\_Qureshi](https://avatars.discourse-cdn.com/v4/letter/f/7ba0ec/32.png) [@Farheen\_Qureshi](https://forum.inductiveautomation.com/u/Farheen_Qureshi)\
**Post date:** [September 11, 2024, 10:51am UTC](https://forum.inductiveautomation.com/t/how-to-get-image-from-database-and-displayed-in-image-viewer/95837/3 "2024-09-11T10:51:28Z")

</div>

No its not working and from where i can get Blob Server

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [September 11, 2024, 11:04am UTC](https://forum.inductiveautomation.com/t/how-to-get-image-from-database-and-displayed-in-image-viewer/95837/4 "2024-09-11T11:04:31Z")

</div>

Just tested and this was correct

> [@victordcq](#):
>
> `{value}[0,0]` (i think, I usually set the return format to json, so not sure

So you have something else. Show the result/error, are you sure the img stored is base 64 and is a png?

Its somewhere in the topic i linked, a post from pturmel

---

<div class="post-metadata">

**Author:** ![Farheen\_Qureshi](https://avatars.discourse-cdn.com/v4/letter/f/7ba0ec/32.png) [@Farheen\_Qureshi](https://forum.inductiveautomation.com/u/Farheen_Qureshi)\
**Post date:** [September 11, 2024, 11:05am UTC](https://forum.inductiveautomation.com/t/how-to-get-image-from-database-and-displayed-in-image-viewer/95837/5 "2024-09-11T11:05:42Z")

</div>

yeah its working thanks!!
