diff --git a/thrimshim/thrimshim/main.py b/thrimshim/thrimshim/main.py index 99c1190..54faaa3 100644 --- a/thrimshim/thrimshim/main.py +++ b/thrimshim/thrimshim/main.py @@ -628,7 +628,12 @@ def get_template(name): image = row[0] logging.info('Thumbnail image of {} fetched'.format(name)) - return flask.Response(image, mimetype='image/png') + return flask.send_file( + io.BytesIO(image), + mimetype='image/png', + as_attachment=False, + download_name=f'{name}.png' + ) @app.route('/thrimshim/template-metadata/')