Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
geantbrun
Contributor
Contributor

How to display jpeg images from Postgres in dashboard

Hi,

It's my first dashboard and I'm trying to show the last 5 images stored in my postgres table. Images are jpeg, base64 encoded and stored as 'bytea' type in Postgres. I have a view in Postgres ('photo__last_5' ) that returns the last 5 images. In my load script in Qlik, I have defined the following:

[last_5]:
Load
created,
'data:image/jpg;base64,' & base64_bytes;
SELECT created, base64_bytes
FROM photo__last_5;

In order to include these photos on my sheet (and after having read this document here), I've added a Map object on my sheet, set the base map to None, turned off the other settings so the object appears blank (having done that, I don't see my object as blank/transparent as they show in the document but rather as "white", don't know if it's normal or not). After that I've added three layers (point (0,0), point (25,25) and my background image) with outline color of white and opacity set to 0 for point layers. After that I've created a Table object that lists the 5 photos, so I can select one. Having done that I was expecting my image would be displayed on the map object but nothing appears (see attached file).

If someone can help here, I would greatly appreciate it

Regards

Patrick 

 

 

Labels (3)
0 Replies