1👍
You’ll need to base-64 encode the image contents into a Data URI:
data_uri = 'data:image/jpg;base64,'
data_uri += mStream.getvalue().encode('base64').replace('\n', '')
Now you can shove data_uri
into the src
attribute of an image.
Source:stackexchange.com