title: How to send images in a jinja html template?
body: <p>So I've got a setup of flask + jinja and I'm trying to display an image in an html file being rendered by jinja.</p>
  
  <p>In Python I'm converting it into base64 and then sending it to the template. I'm then using an image tag to display the image.</p>
  
  <pre><code>&lt;img src="data:image/jpeg;base64,{{ myimage }}"&gt;
  </code></pre>
  
  <p>I've confirmed that the Python encoding is correct, it displays as it should when I simply write an html file with the base64 embedded into it. Where it seems to fail is from the template modifying the output a little bit. In particular:</p>
  
  <pre><code>&lt;img src=3D"data:;base64,/9j/4QAYR
  ...
  baW4WqWj/2Q=3D=3D"/&gt;
  </code></pre>
  
  <p>Jinja seems to be screwing around by adding the text 3D in a couple places where it looks like it shouldn't be. I haven't specified anything differently, and when I printed out myimage just as text, it came up the way I expected it to, starting with /9j and ending with /2Q==</p>
  
  <p>I'm not sure if there's something with the way I'm interpreting it in Jijna or what, but it just doesn't load. I see the image src tag in the email source, but there's just nothing where I expect the image to be loaded.</p>