Reference

Guide

gallery

A list of images to create galleries of all sorts

Preview

Default snippet

/site/snippets/blocks/gallery.php
<figure>
  <ul>
    <?php foreach ($block->images()->toFiles() as $image): ?>
    <li>
      <?= $image ?>
    </li>
    <?php endforeach ?>
  </ul>
</figure>

Default blueprint

name: field.blocks.gallery.name
icon: dashboard
preview: gallery
fields:
  images:
    label: field.blocks.gallery.images.label
    type: files
    multiple: true
    layout: cards
    size: tiny
    empty: field.blocks.gallery.images.empty
    uploads:
      template: blocks/image
    image:
      ratio: 1/1

Default Vue Component

https://github.com/getkirby/kirby/blob/master/panel/src/components/Blocks/Types/Gallery.vue