1👍
✅
Use get_static_prefix tag:
{% load static %}
{% for key, value in dict.items %}
...
<img src="{% get_static_prefix %}img/{{ key|slugify }}.jpg"/>
...
{% endfor %}
👤vvd
Source:stackexchange.com