I have an entry with an asset field that has up to 3 assets in it. If I want to load just the second asset in my template code, what's the syntax for this? (can't find any references/examples)

2 Answers 2


Image assets are returned in an array. Let's say you have an assets field with the handle of images. You can just use bracket notation to get the second item in the array using: entry.images[1]. So if you wanted to return the URL you could just do:

{{ entry.images[1].url }}

In Craft 3 this should be:

  {% if entry.images | length > 1 %}
    {% set secondImage = entry.images.1 %}
  {% endif %}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.