title: how to convert array chunk in twig
body: <p>I want to convert the following line from PHP to twig I tried many methods but no use can anyone guide me how to do...</p>
  
  <pre><code>&lt;?php foreach (array_chunk($images, 4) as $image) { ?&gt;
  </code></pre>
  
  <p>and </p>
  
  <pre><code>&lt;?php if ($image['type'] == 'image') { ?&gt;
  </code></pre>