title: How to display Flask image to HTML directly without saving?
body: <p>flask code:</p>
  
  <pre><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)
  </code></pre>
  
  <p>html code:</p>
  
  <pre><code>&lt;img src="{{ uri }}"&gt;
  </code></pre>
  
  <p>I tried this, but the image is not getting displayed. Any idea how? I have image in a numpy array. </p>