The problem is that returning a page to the user would normally involve two requests: one for the HTML page, and one for the image itself as referenced by an img tag in that HTML. But as you say, without storing it anywhere in the meantime, the image would be lost.
There is an alternative: you can use a data uri to include the actual data for the image inline in the html. That means you won't have to persist it across requests, as everything will be returned at one. Data uris are supported in most browsers, including ie8+.
You can format the data like this, for example:
from base64 import b64encode
encoded = b64encode(img_data)
mime = "image/jpeg"
uri = "data:%s;base64,%s" % (mime, encoded)
And use it directly in the template:
<img src="{{ uri }}">
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…