@app.route('/recipe/<id>', methods=['GET', 'POST'])
def show_entry(id):
    entry = db_session.query(Recipe).get(id)
entry.image = entry.image.encode('base64')
return render_template('show_entry.html', entry=entry)
Кодирование бинарных данных в flask/jinja2