Exclude header image from getting displayed by the «simple gallery» cookbook

Hello everyone,

I’m planning to apply the «simple gallery» cookbook for a Grav powered portfolio site. Is there any way I could exclude a single image (the header image) from getting rendered?

My current workaround is by putting each of the gallery’s header image inside their own respective subfolder called _img and displaying them through hardcoded <img> tag in the Twig template.

I’m just wondering if there is another efficient way to do this. :smile:

By the way, here is how I hardcoded the header image:

{% if header_image %}
        {% set the_the_the_current_folder = page.filePathClean|rtrim('md') %}
        {% set the_the_current_folder = the_the_the_current_folder|rtrim('.') %}
        {% set the_current_folder = the_the_current_folder|rtrim(page.template) %}
        <img src="{{ base_url_absolute }}/{{ the_current_folder }}/_img/header.jpg">
{% endif %}

Bear with me, I’m no programmer. :smile: