Skip to content

Kirby 3.7.5

$page->images()

Filters the Files collection by type image

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

Return type

Kirby\Cms\Files

Parent class

Kirby\Cms\Page

Example

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