image($filename = null)

Fetches any image by filename for the current page, or by path for any other page

  • since: Kirby 2.3.0
  • $filename (string)
  • return ($file)

Example

Fetching an image of the current page

<?= image('forrest.jpg')->url() ?>

Fetching an image from any other page

<?= image('projects/project-a/forrest.jpg')->url() ?>