@app.route('/event/<int:id>/logo')
def event_logo(id):
    event = Event.query.get_or_404(id)
return app.response_class(event.logo, mimetype='application/octet-stream')
Serve image stored in SQLAlchemy LargeBinary column