fall back to empty alt text instead of repeating title

This commit is contained in:
madrilene 2025-03-28 11:41:34 +01:00
parent bf78aeb152
commit 5913b5f733
2 changed files with 5 additions and 5 deletions

View file

@ -9,7 +9,7 @@ schema: BlogPosting
{% if image %}
<!-- image -->
{% image image, alt or title, credit, "eager", "feature" %}
{% image image, alt or "", credit, "eager", "feature" %}
{% endif %}
<p class="meta | cluster gutter-xs-s">

View file

@ -108,10 +108,10 @@ As for the higher build cost of post-processing, the shortcode images are being
{% raw %}
```jinja2
{% image image, alt or title, credit, "eager", "feature", "grayscale" %}
{% image image, alt or "", credit, "eager", "feature", "grayscale" %}
<figure class="feature">
<img src="{{ image }}" alt="{{ alt or title }}" loading="eager" decoding="sync" class="grayscale">
<img src="{{ image }}" alt="{{ alt or '' }}" loading="eager" decoding="sync" class="grayscale">
{% if credit %}
<figcaption>{{ credit }}</figcaption>
{% endif %}
@ -121,10 +121,10 @@ As for the higher build cost of post-processing, the shortcode images are being
{% endraw %}
{% image image, alt or title, credit, "eager", "feature", "grayscale" %}
{% image image, alt or "", credit, "eager", "feature", "grayscale" %}
<figure class="feature">
<img src="{{ image }}" alt="{{ alt or title }}" loading="eager" decoding="sync" class="grayscale">
<img src="{{ image }}" alt="{{ alt or '' }}" loading="eager" decoding="sync" class="grayscale">
{% if credit %}
<figcaption>{{ credit }}</figcaption>
{% endif %}