Add route to serve user avatar files to fix avatar display issue

parent c9dc4995
......@@ -1109,6 +1109,12 @@ def delete_avatar():
return redirect(url_for('account'))
@app.route('/static/avatars/<filename>')
def serve_avatar(filename):
"""Serve user avatar files."""
return send_from_directory(avatars_dir, filename)
@app.route('/account/change_password', methods=['POST'])
@login_required
def change_password():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment