I am using [ODK Collect][1] to collect ground data. The data collected are stored into a PostgreSQL/PostGIS database then I publish them as WFS through MapServer and read them with Leaflet (Leaflet-WFST plugin). Everything works fine except for the images (stored as bytea in PostgreSQL). 

I tried to use `<img src="data:image/png;base64,"+byteaField>` in the html pop-up but it seems that the bytea field is not correctly exported from PostGIS to the WFS.

Someone has already done that?

This is a print screen of my PostGIS view table:
[![enter image description here][2]][2]

This is my WFS GetFeature: http://earthtrack.aber.ac.uk/cgi-bin/mapserv?map=/home/sec27/odk/wfs.map&SERVICE=WFS&REQUEST=GetFeature&VERSION=2.0.0&TYPENAMES=lccs_variables_img

More information:

`PostGIS: POSTGIS="2.4.3 r16312" PGSQL="100" GEOS="3.6.2-CAPI-1.10.2 4d2925d6" PROJ="Rel. 4.9.3, 15 August 2016" GDAL="GDAL 2.2.3, released 2017/11/20" LIBXML="2.9.4" LIBJSON="0.12.1" LIBPROTOBUF="1.2.1" TOPOLOGY RASTER`

`Mapserver: MapServer version 7.2.1 OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=SVG_SYMBOLS SUPPORTS=RSVG SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS SUPPORTS=PBF INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE`



  [1]: https://docs.opendatakit.org/collect-intro/
  [2]: https://i.sstatic.net/z7oez.png