fix empty alt text

This commit is contained in:
rimu 2024-01-28 18:31:27 +13:00
parent d7c871822a
commit 538a842b30

View file

@ -32,10 +32,10 @@
<div class="post_image"> <div class="post_image">
{% if post.image_id %} {% if post.image_id %}
{% if low_bandwidth %} {% if low_bandwidth %}
<a href="{{ post.image.view_url() }}" rel="nofollow ugc"><img src="{{ post.image.thumbnail_url() }}" alt="{{ post.image.alt_text if post.image.alt_text else '' }}" <a href="{{ post.image.view_url() }}" rel="nofollow ugc"><img src="{{ post.image.thumbnail_url() }}" alt="{{ post.image.alt_text if post.image.alt_text else post.title }}"
width="{{ post.image.width }}" height="{{ post.image.height }}" /></a> width="{{ post.image.width }}" height="{{ post.image.height }}" /></a>
{% else %} {% else %}
<a href="{{ post.image.view_url() }}" rel="nofollow ugc"><img src="{{ post.image.view_url() }}" alt="{{ post.image.alt_text if post.image.alt_text else '' }}" <a href="{{ post.image.view_url() }}" rel="nofollow ugc"><img src="{{ post.image.view_url() }}" alt="{{ post.image.alt_text if post.image.alt_text else post.title }}"
width="{{ post.image.width }}" height="{{ post.image.height }}" /></a> width="{{ post.image.width }}" height="{{ post.image.height }}" /></a>
{% endif %} {% endif %}
{% else %} {% else %}