How to correctly set cover image from blueprint file

Hi there,

I have a somewhat trivial question (sorry for that).
I have a video / audio file and I set a field to upload a preview image in blueprints> files> default.yml

    label: Thumbnail
    type: files
    files: true
    help: Only for multimedia file (audio/video)

In the template I use this method:

<img class="audio-thumbnail" src="<?= $item->cover_thumb()->url(); ?>">

But It only returns this string:

- progetti/name-project/cover_image.png

Any idea, something related to the “query” option?

You have to convert to a File or Files object first.

1 Like

Oh I see, the problem was the page’s path when I used “toFile” method.
That’s why I mentioned a “trivial” question.
Thank you!