Converting BLOB, stored on a database, to an image on an HTML website

Depending on how its encoded, you can also possibly just use a Data URI for the image. Something like this might work if they are encoded as base64 PNGs.

<img  src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIA..." />

As @Alok says, you might need to first convert it from binary blob to base64, then use the Data URI.


image is stored in database in binary format so once it comes to server using decode function to get it back to image

image.decode('base64')

this will convert your blob to image