Jinja2/Python insert a image(s) into html
<p>I am just looking into using Jinja2 with a python application I have already written.  I may be going about this in the wrong way, but here is what I would like to do.</p>

<pre><code>from jinja2 import Environment, FileSystemLoader
from weasyprint import HTML
env = Environment(loader=FileSystemLoader('.'))
template = env.get_template("really.html")

template_vars = {"title":"TITLE","graph":'total.png'}

html_out = template.render(template_vars)

HTML(string=html_out).write_pdf("report.pdf")
</code></pre>

<p>This nearly produces what I want, I get a pdf called report.pdf, but instead of the attached file, it is a string of total.png.  This is my first run at using Jinja, so hopefully attaching an image like this is possible.  Thanks.</p>

<p>This is the template, not much built, just trying to do this piece at first.</p>

<pre><code>&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head lang="en"&gt;
&lt;meta charset="UTF-8"&gt;
&lt;title&gt;{{ title }}&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h2&gt;Graph Goes Here&lt;/h2&gt;
 {{ graph }}
&lt;/body&gt;
&lt;/html&gt;
</code></pre>