Twig syntax to display uploaded custom files

Grav newbie and running into an issue where I can’t figure out how to grab and display a custom file that I uploaded earlier through the admin CMS.

header.review_basics_masthead:
type: file
label: Masthead
destination: 'uploads/reviews'
blueprint: 'themes.mytheme'
accept:
- image/jpeg

It’s essentially this code, but modified slightly as I don’t want to showcase the site name just yet (it’s working and the CMS is keeping the record of the file upon reload, so that’s not the issue).

I turned on debug and I see the array object if I:

{{ dump(page.header.review_basics_masthead) }}
array:1 [
  "uploads/reviews/review.jpg" => array:6 [
    "name" => "review.jpg"
    "path" => "uploads/reviews/review.jpg"
    "type" => "image/jpeg" 
    "size" => 65756
    "file" => "uploads/reviews/review.jpg"
    "route" => null
  ]
]

So I know it’s working, but I can’t figure out the proper syntax to actually get the image from this. I thought it might have been adding .path, .file, etc., but those all were NULL, so that isn’t it. Couldn’t find anything in the documentation either.

Not sure how I can close out topics, I ended up using the pagemediaselect functionality here instead.

Hey! For what is worth… I found a workaround:

I also tried {{ page.header.thumbnail[0] }} and similar, but no dice.

This is how I did it. Just traverse the uploaded files array:

{% set thumbnail = "" %}

{% for key, item in page.header.thumbnail %}
  {% set thumbnail = item.path %}
{% endfor %}
---