A
A
Alexander Karpenko2019-03-03 07:10:19
Flask
Alexander Karpenko, 2019-03-03 07:10:19

How to insert an image in Flask?

You need to insert an image into a Flask site via HTML

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey Gornostaev, 2019-03-03
@sergey-gornostaev

Yes Easy!
<img src="/path/to/image.jpg">

A
Alexander, 2019-03-03
@NeiroNx

Let's say the flash instance is called app and all executable files - forms and other things are in the app folder, then you need to create folders: app / static / images
<img src="/static/images/image.jpg">

M
Mikhail, 2019-03-03
@lightarhont

<img src="{{ url_for('static', filename='site/images/img.img') }}" />

Will hiccup in the static folder then

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question