Display images in Matrix block in grid view I have images in matrix block 
I want to display in grid format 
Each raw will have three column.

Images 1   images 2  image2
Images 4  images4  image 4

I tried to used batch filter but did not work with matrix block.

 {% for block in entry.profilematrix %}
{% switch block.type %}

{% case "profilebuilder" %}

{% set debfilter = block.department %}

        {# use the variable to filter the entries #}

        {% if block.department == craft.request.lastSegment   %}






                 {% for image in block.uploadImageProfile %} 




             {% endfor %}

        {% endif %}

 {% endfor %}

  {% endfor %}
{% for batch in block.images|batch(3) %}
  &lt;div class="row"&gt;
  {% for image in batch %}
    &lt;div class="column"&gt;
      &lt;img src="{{ image.url }}" alt=""&gt;
    &lt;/div&gt;
  {% endfor %}
  &lt;/div&gt;
{% endfor %}