Reputation: 785
I am having a problem where when I try to run my website through the runserver command, it doesnt display any of the images.
(I am very new to django, and website building at all)
this is the html in the template:
< img src="../../../static/Website_header.png" width="800" height="200" alt=""/> (without the whitespace)
and this is the settings.py:
Edit: When I tried to click display image in new tab this was shown: https://i.sstatic.net/V9JzR.jpg
Upvotes: 0
Views: 275
Reputation: 6733
You should not have direct links to your static files.
On top of your template:
{% load staticfiles %}
Your image tag:
<img src="{% static 'images/test.png' %}" />
"images/test.png" is addressed relative to your static folder:
static
------ images
------------ test.png
Upvotes: 2