I'm trying to add an icon to my website using:
@app.route('/favicon.ico')def favicon(): return url_for('static', filename='images/favicon.ico')
and when i'm using the "flask generated ip" hosted on my pc it works for all the pages, even the 404 pages, but when i host it on heroku it shows only on the ' / ' page.
I also tried
<link rel="shortcut icon" href="{{ url_for('static', filename='images/favicon.ico') }}">
and
@app.route('/favicon.ico')def favicon(): return send_from_directory(os.path.join(app.root_path, 'static'),'images/favicon.ico', mimetype='image/vnd.microsoft.icon')
but I got the same result.
How can I fix it?