<p>Because logoSlider.image is an array of images (even if there's only one image in the array) you need an additional 'for' loop to catch all of the images (not just the first or last). Try something like this:</p>

<pre><code>{% for logoSlider in entry.logoSlider %} 
   {% if logoSlider.type == 'logo' %} 
     {% for image in logoSlider.image %}
       &lt;div class="column column-block"&gt;
         &lt;img src="{{image.url}}" alt="{{image.title}}" /&gt;
       &lt;/div&gt;
     {% endfor %}
   {% endif %}
 {% endfor %}
</code></pre>

CC BY-SA 3.0
2017-06-08T13:02:51.037Z
2017-06-08T13:02:51.037Z
PhilR
<p>I'm trying to bring in all images from a matrix field but I can only get it to work with first() or last() but obviously it only shows 1 image. </p>

<p>I've found a few article explaining it but I can't seem to get it working. </p>

<assets><matrix><output>
Show all images from Matrix Block
# Show all images from Matrix Block

(Asked by: username_0 on 2017-06-08)

I'm trying to bring in all images from a matrix field but I can only get it to work with first() or last() but obviously it only shows 1 image.

I've found a few article explaining it but I can't seem to get it working.

**Tags:** assets, matrix, output

---

## 1 answers

### Answer by username_1 on 2017-06-08. Score: 3 | Accepted answer

Because logoSlider.image is an array of images (even if there's only one image in the array) you need an additional 'for' loop to catch all of the images (not just the first or last). Try something like this:
{% for logoSlider in entry.logoSlider %} 
   {% if logoSlider.type == 'logo' %} 
     {% for image in logoSlider.image %}
       
         
       
     {% endfor %}
   {% endif %}
 {% endfor %}


---

