Answers.Body: <p>It may not be suitable for your use case but you could use an <a href="https://docs.craftcms.com/v3/dev/element-queries/asset-queries.html" rel="nofollow noreferrer">Asset query</a> to fetch assets related to your entry:</p>
  
  <pre class="lang-twig prettyprint-override"><code>{% set assets = craft
      .assets()
      .withTransforms(['eventImage'])
      .relatedTo({
          sourceElement: entry,
          field: ['your','fields']
      })
      .all() %}
  
  {% for asset in assets %}
  ...
  {% endfor %}
  </code></pre>
  
  <p>(If these are your only asset fields on the entry, you don't need <code>field: ['your','fields']</code>)</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-03-05T18:58:41.630Z
Answers.LastActivityDate: 2020-03-06T09:27:44.633Z
Answers.LastEditDate: 2020-03-06T09:27:44.633Z
Answers.UserDisplayName: Oli
Body: <p>I'm looking to see if there's a better way of querying multiple asset fields in one query, surely there is but I just can't seem to find it in the docs. </p>
  
  <pre><code>      {% for asset in entry.eventMediaTile.all() %}
          &lt;a class="carousel-item white-text" href="#{{ loop.index  }}"&gt;
            &lt;img alt="{{ entry.title }} Images" src="{{ asset.getUrl('eventImage') }}"/&gt;
          &lt;/a&gt;
        {% endfor %}
        {% for asset in entry.eventMediaTriplet1.all() %}
          &lt;a class="carousel-item white-text" href="#{{ loop.index  }}"&gt;
            &lt;img alt="{{ entry.title }} Images" src="{{ asset.getUrl('eventImage') }}"/&gt;
          &lt;/a&gt;
        {% endfor %}
        {% for asset in entry.eventMediaTriplet2.all() %}
          &lt;a class="carousel-item white-text" href="#{{ loop.index  }}"&gt;
            &lt;img alt="{{ entry.title }} Images" src="{{ asset.getUrl('eventImage') }}"/&gt;
          &lt;/a&gt;
        {% endfor %}
        {% for asset in entry.eventMediaTriplet3.all() %}
          &lt;a class="carousel-item white-text" href="#{{ loop.index  }}"&gt;
            &lt;img alt="{{ entry.title }} Images" src="{{ asset.getUrl('eventImage') }}"/&gt;
          &lt;/a&gt;
        {% endfor %}
        {% for asset in entry.eventMediaTriplet4.all() %}
          &lt;a class="carousel-item white-text" href="#{{ loop.index  }}"&gt;
            &lt;img alt="{{ entry.title }} Images" src="{{ asset.getUrl('eventImage') }}"/&gt;
          &lt;/a&gt;
        {% endfor %}
        {% for asset in entry.eventMediaTriplet5.all() %}
          &lt;a class="carousel-item white-text" href="#{{ loop.index  }}"&gt;
            &lt;img alt="{{ entry.title }} Images" src="{{ asset.getUrl('eventImage') }}"/&gt;
          &lt;/a&gt;
        {% endfor %}
  </code></pre>
  
Tags: <templating>
Title: Multiple Asset Field Query
ThreadText: # Multiple Asset Field Query
  
  (Asked by: username_0 on 2020-03-05)
  
  I'm looking to see if there's a better way of querying multiple asset fields in one query, surely there is but I just can't seem to find it in the docs.
  
  ```
        {% for asset in entry.eventMediaTile.all() %}
          <a class="carousel-item white-text" href="#{{ loop.index  }}">
            <img alt="{{ entry.title }} Images" src="{{ asset.getUrl('eventImage') }}"/>
          </a>
        {% endfor %}
        {% for asset in entry.eventMediaTriplet1.all() %}
          <a class="carousel-item white-text" href="#{{ loop.index  }}">
            <img alt="{{ entry.title }} Images" src="{{ asset.getUrl('eventImage') }}"/>
          </a>
        {% endfor %}
        {% for asset in entry.eventMediaTriplet2.all() %}
          <a class="carousel-item white-text" href="#{{ loop.index  }}">
            <img alt="{{ entry.title }} Images" src="{{ asset.getUrl('eventImage') }}"/>
          </a>
        {% endfor %}
        {% for asset in entry.eventMediaTriplet3.all() %}
          <a class="carousel-item white-text" href="#{{ loop.index  }}">
            <img alt="{{ entry.title }} Images" src="{{ asset.getUrl('eventImage') }}"/>
          </a>
        {% endfor %}
        {% for asset in entry.eventMediaTriplet4.all() %}
          <a class="carousel-item white-text" href="#{{ loop.index  }}">
            <img alt="{{ entry.title }} Images" src="{{ asset.getUrl('eventImage') }}"/>
          </a>
        {% endfor %}
        {% for asset in entry.eventMediaTriplet5.all() %}
          <a class="carousel-item white-text" href="#{{ loop.index  }}">
            <img alt="{{ entry.title }} Images" src="{{ asset.getUrl('eventImage') }}"/>
          </a>
        {% endfor %}
  
  ```
  
  **Tags:** templating
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-03-05. Score: 2 | Accepted answer
  
  It may not be suitable for your use case but you could use an [Asset query](https://docs.craftcms.com/v3/dev/element-queries/asset-queries.html) to fetch assets related to your entry:
  
  ```twig
  {% set assets = craft
      .assets()
      .withTransforms(['eventImage'])
      .relatedTo({
          sourceElement: entry,
          field: ['your','fields']
      })
      .all() %}
  
  {% for asset in assets %}
  ...
  {% endfor %}
  
  ```
  
  (If these are your only asset fields on the entry, you don't need `field: ['your','fields']`)
  
  
  ---
  
  