{% for file in files %}
{% if 'png' in file or 'jpg' in file or 'jpeg' in file or 'gif' in file%}
{% endif %}
{% if 'mp3' in file or 'm4a' in file or 'ogg' in file %}
{% endif %}
{% if 'mp4' in file or 'mkv' in file or 'ogv' in file %}
{% endif %}
{% endfor %}