flask code:
from base64 import b64encode
def abc()
encoded = b64encode(img_data)
mime = "image/jpeg"
uri = "data:%s;base64,%s" % (mime, encoded)
return render_template('/result.html',uri=uri)
html code:
<img src="{{ uri }}">
I tried this, but the image is not getting displayed. Any idea how? I have image in a numpy array.