[Answer]-How to display picture from memory in Django?

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.

Leave a comment