How to reference hero image in the images file

@normawhite I have never used Quark but had a look at the README and code.

The README.md says explicitly:

The hero_image should point to an image file in the current page folder

And also the code looks for an image in the folder of the page. For example, the twig templates/item.html.twig looks for the image with:

{% set hero_image_name = page.header.hero_image %}

{% set hero_image = page.media[hero_image_name] %}

If you want the template to find an image in the pages/images folder, do the following:

  • In the page’s frontmatter do:

    hero_image: small-bandpic.png

    Note: No path prepended

  • In the template item.html.twig file:

    {% set hero_image = page.find(‘/images’).media[hero_image_name] %}

    See the Grav docs in Where to put your media files