{% with first_attr=obj|getattr:select_display.0 %} {% if first_attr|is_image %}
{% endif %} {% endwith %}