Access file meta data in template

How do I pull in the info from the file default.yml into the php Kirby code?

I’m currently using an extra field to add the alt tag text into the html, but would rather minimise the whole thing and pull it from the image info.

  <?php if($image = $data->foliobigimg()->toFile()): ?>
    <img <?= $page->animation() ?> src="<?= $image->url() ?>" alt="<?= $data->foliobigimgalt() ?>">
  <?php endif ?>

You can access the image meta data with

$image->fieldname()

If you meta data field is called alt that would be:

echo $image->alt()->html();

Easy peasy! Thank you (again) @texnixe :slight_smile: