How do I display the index of the asset in assets loop? Looking to do something like this:

{% for image in block.images %}
    &lt;img src="{{ image.url }}" data-index="{{ image.index }}"&gt;
{% endfor %}


This seems like it should be easy and I feel like I've done it before, however I can't seem to figure it out. Thanks
This will do it:

{% for key, image in block.images %}
    {{ key }} - &lt;img src="{{ image.url }}" data-index="{{ key }}"&gt;
{% endfor %}


Keep in mind that's a 0 based array, so the first image will output 0, the 2nd 1, etc.