Hello again!
We’ve setup a content folder where all blog posts are organised by folder. Currently, our code accepts ‘header.png’ as the header of a blog post. So far so good.
We would like to add jpg/jpeg/gif as an option as well. It just looks for either one of those extensions. And we will manage that there is only 1 image file at a time.
Anyone with experience in this area? ty!!!
<div class="blog-image" style="background-color: <?php echo $page->Colour() ?>;">
<?php if($image = $page->image('header.png')): ?>
<img src="<?php echo $image->url() ?>" />
<?php endif ?>
</div>
</div>