$field->toFile() Returns a file object from a filename in the field kirby/config/methods.php#L138 $field->toFile(): Kirby\Cms\File|null Return type Kirby\Cms\File|null Example <?php if ($cover = $page->cover()->toFile()): ?> <figure class="cover"> <img src="<?= $cover->url() ?>" alt="<?= $cover->alt() ?>"> </figure> <?php endif ?>