[Fixed]-Use Django Template Tags in img src

1đź‘Ť

Just set a variable on the context containing the path to the file in question. You can reference variables in the static template tag (here named special_image_path):

<img class="img-responsive" src="{% static special_image_path %}"/>

See the second example here in the Django docs

👤chucksmash

Leave a comment