How do I target the first item in a Twig for loop? I'm looping through some images and want to target just the first image. How do I do that?

{% for image in entry.images %}
&lt;img src="{{ image.url }}" alt="{{ image.title }}"&gt;
{% endfor %}
Twig has loop-variables which can be accessed inside for-loops. loop.first will return true on the first iteration.

{% for image in entry.images %}
    &lt;img src="{{ image.url }}" alt="{{ image.title }}"&gt;

    {% if loop.first %}
        Do stuff..
    {% endif %}
{% endfor %}