Get image from aggregate database

I have a form that collects attributes including images. I'm building an application that fetches that from database views and displays it. So within the database I want to create a view that has the columns of the form including the image.
My end goal is that, when the view is queried, it will return like name, age, picture.
I really need help with this gurus.

What tool are you using to expose the view to the user ? Maybe you can show binary data as an image out of the box...
We faced this need for a php web tool we use since 2009.
Our strategy, wich may not be the best, was and is still to create image on the server and show it into the interface.
Here is the discussion about it :

You will find the description of our process (PostgreSQL function + crontab).
At the end my colleagues can see their picture in the web tool or in QGIS as soon (almost) as they send data over aggregate.

The solution depends on the lo extension. I'm using amazon RDS and when I try to install the extension, it says the AWS RDS does not support lo.
Is there any other way around it?

Is there a way to get the links of the images as the aggregate provides? To query the database and for each record, you get the links to its image

I still need help on this please

You can try to create the url of the pictures shown by Aggregate (in the submission tab for your form)
It contains the uuid of the data (core table's "_UID" column)

http://you_url//ODKAggregate/view/binaryData?blobKey=your_form_name%5B%40version%3Dnull+and+%40uiVersion%3Dnull%5D%2Fdata%5B%40key%3Duuid%3A22c7f2f6-df36-4e49-bfe2-68e62c32d5cc%5D...

Please how do I use this in the database. Is it some kind of string concatenation?

Yes, as a workaround...

SELECT ..., concat('http://you_url//ODKAggregate/view/binaryData?blobKey=your_form_name%5B%40version%3Dnull+and+%40uiVersion%3Dnull%5D%2Fdata%5B%40key%3Duuid%3A',"_URI",'%5D...') as image_url 
FROM ...

Right, thank you @mathieubossaert