how to style images in static files in flask code example
Example 1: how to add images in hml while using flask
<image src="{{url_for('static',filename = 'images/download.jpg')}}" >
<!--filename = "path of your image in in static folder"-->
Example 2: flask make static directory
from flask import Flask, send_from_directory
app = Flask(__name__)
@app.route("/static/<path:path>")
def static_dir(path):
return send_from_directory("static", path)
if __name__ == "__main__":
app.run()