python-3.7django-1.10

Why is my sublimetxt3 giving error while loading static images?


{% load staticfiles %}
<html>
<head>
	<title>DJANGO PAGE</title>
</head>
<body>
	<H1>Hello this is index.html</H1>
	<h1>Hi this contains an image also</h1>
	<img src="{% static "images/abc.jpg" %}">
</body>
</html>

This is my index.html.It is unable to fetch the static image from my settings.py

1

2


Solution

  • Try this you load staticfiles but you have used static

    <img src="{% staticfiles "images/abc.jpg" %}">