In one of my templates I use
{% for key, value in dict.items %}
...
<img src="{% static 'img/{{ key|slugify }}.jpg' %}"/>
...
{% endfor %}
but the output is not the one expected so I guess that one cannot use template filters within a static
tag.
Any suggestions on how to achieve this then?
Edit: the keys of the dict above are strings that corresponds to the filenames of the jpg images.