Skip to content

Kirby 3.6.6

$site->images()

Filters the Files collection by type image

$site->images(): Kirby\Cms\Files

Return type

Kirby\Cms\Files

Parent class

Kirby\Cms\Site

Example

<section class="gallery">
  <?php foreach($site->images() as $image): ?>
  <figure>
    <a href="<?= $image->url() ?>">
      <img src="<?= $image->url() ?>" alt="">
    </a>
  </figure>
  <?php endforeach ?>
</section>