X
X
xxxfdd2020-04-27 15:04:37
Python
xxxfdd, 2020-04-27 15:04:37

Why when I want to insert an image on my site I get this instead of an image?

5ea5a95e9cff5484788092.png

here is the code
@app.route('/image_sample')
def image():
return '''%7B%7D'''.format(url_for('static', filename='img/gg.jpg'))

it doesn't help either ( ) <img src="gg.jpg>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
ThunderCat, 2020-04-27
@xxxfdd

right-click on your "picture", look at the path from where it is requested. The correct option looks something like this:
src="http://localhost/images/1.jpg"or src="/images/1.jpg"
incorrect:
src="1.jpg"or something similar, without a root slash and / or a folder with a picture. Learn to use the console, see the source.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question