2👍
✅
Something like this maybe:
{% if forloop.first %}<div class="holder">{% elif forloop.counter0|divisibleby:"5" %}</div><div class="holder">{% endif %}
<img>
{% if forloop.last}</div>{% endif %}
Source:stackexchange.com