Hero image, Antimatter

Hey, dumb question but I’m just wondering if there’s a simple way to set a hero/header image with the default Antimatter theme? I’ve looked into one of the skeleton themes and I’m wondering if just copying this section of the code would work? Or is there something else I would need to consider? Thanks all!

{% set blog_image = page.media.images %}
{% if blog_image %}
<div class="flush-top blog-header blog-header-image" style="background-image: url({{ blog_image.url }});">
{% else %}
<div class="blog-header">
{% endif %}
</div>

I’ve used something similar, and it works. I used page.media.images|first though, I’m not sure what .url does on a collection of images. There’s no harm in trying!

Thanks a million! Kind of funny but just adding the |first fixed the whole problem.

Nice to hear! page.media.images returns an array with images from the folder of the page. It probably didn’t work because you can’t ask for the URL of a collection of images. You can however ask for the URL of the first image in the collection.