Panel Cover Image

I can’t seem to get a cover image to display on a post preview.

This is my individual post blueprint:

title: Project
num: date

columns:
  - width: 1/3
      sections:
        projectIntro:
          type: fields
          fields:
            heroImage:
              type: files
              label: Hero Image
              query: site.images
              empty: No file selected yet.
              multiple: false
              layout: cards
              image:
                cover: true
              uploads:
                parent: site
            projectIntro:
              type: text
              label: Project Intro

And this is the blueprint I’m using to display Published entries:

- width: 2/3
        sections:
          listed:
            extends: sections/projects
            headline: Published
            status: listed
            layout: cards
            image:
              query: page.heroImage
              cover: true

No matter what I seem to do, it just shows an icon on the panel for the post preview:

The query has to return an image object:

query: page.heroImage.toFile

The [toFile](https://getkirby.com/docs/reference/templates/field-methods/to-file) method converts the field value to a file object.

3 Likes

For every stupid question I ask, I promise I’m finding answers to 100 others either in the forums or documentation. Thanks again! :smiley:

1 Like

Well, something seems to be wrong with our documentation. Got to improve it somehow.

I’m pretty sure the problem is with me. In case it helps, I’m getting ready to purchase a license for the site I’ve been working on, and I should be able to launch it next week (largely due to your patience with my stupid questions).

Thank you so much!

1 Like