You can not use a local path like this in Django.
Look at Managing static files (e.g. images, JavaScript, CSS)
Point 1 and 2 should have been added automatically.
Check eg
Place image in images folder eg
Then a html file in templates could look like this.
Look at Managing static files (e.g. images, JavaScript, CSS)
Point 1 and 2 should have been added automatically.
Check eg
settings.py
that there is:STATIC_URL = '/static/'Now make a folders
static/images
in your app folder.Place image in images folder eg
img_girl.jpg
.Then a html file in templates could look like this.
<!-- templates/image.html --> {% extends 'base.html' %} {% block content %} {% load static %} <!DOCTYPE html> <html> <body> <h2>HTML Image</h2> <!-- The Django way --> <img src="{% static "images/img_girl.jpg" %}" alt="Girl in a jacket" width="500" height="600"> <!-- Direct path to image --> <img src="../static/images/img_girl.jpg" alt="Girl in a jacket" width="500" height="600"> </body> </html> {% endblock %}