[Answer]-Django template image won't load (repost)

1👍

Try either

<img src="{{ STATIC_URL }}images/logo.png" alt="alternative text" />

or fixing your quotes

<img src="{% static 'images/logo.png' %}" alt="alternative text" />

and fixing your settings

STATICFILES_DIRS = ('assets', r'C:\Users\@#@#@#@#@\workspace\project\static'),

or

STATICFILES_DIRS = ('assets','C:\\Users\\@#@#@#@#@\\workspace\\project\\static'),

0👍

It’s worth asking whether or not you’ve used Django’s collectstatic method after including the image in your assets folder.

👤mumush

Leave a comment