lazy load profile pics

This commit is contained in:
rimu 2024-02-09 20:04:36 +13:00
parent b40dd1444b
commit 602c83699a
2 changed files with 2 additions and 2 deletions

View file

@ -21,7 +21,7 @@
{% else %} {% else %}
{% if comment['comment'].author.avatar_id and comment['comment'].score > -10 and not low_bandwidth %} {% if comment['comment'].author.avatar_id and comment['comment'].score > -10 and not low_bandwidth %}
<a href="/u/{{ comment['comment'].author.link() }}" title="{{ comment['comment'].author.ap_id }}"> <a href="/u/{{ comment['comment'].author.link() }}" title="{{ comment['comment'].author.ap_id }}">
<img src="{{ comment['comment'].author.avatar_image() }}" alt="Avatar" /></a> <img src="{{ comment['comment'].author.avatar_image() }}" alt="Avatar" loading="lazy" /></a>
{% endif %} {% endif %}
<a href="/u/{{ comment['comment'].author.link() }}" title="{{ comment['comment'].author.link() }}"> <a href="/u/{{ comment['comment'].author.link() }}" title="{{ comment['comment'].author.link() }}">
{{ comment['comment'].author.display_name() }}</a> {{ comment['comment'].author.display_name() }}</a>

View file

@ -74,7 +74,7 @@
{% else %} {% else %}
{% if comment['comment'].author.avatar_id and comment['comment'].score > -10 and not low_bandwidth %} {% if comment['comment'].author.avatar_id and comment['comment'].score > -10 and not low_bandwidth %}
<a href="/u/{{ comment['comment'].author.link() }}" title="{{ comment['comment'].author.ap_id }}"> <a href="/u/{{ comment['comment'].author.link() }}" title="{{ comment['comment'].author.ap_id }}">
<img src="{{ comment['comment'].author.avatar_image() }}" alt="Avatar" /></a> <img src="{{ comment['comment'].author.avatar_image() }}" alt="Avatar" loading="lazy" /></a>
{% endif %} {% endif %}
<a href="/u/{{ comment['comment'].author.link() }}" title="{{ comment['comment'].author.link() }}"> <a href="/u/{{ comment['comment'].author.link() }}" title="{{ comment['comment'].author.link() }}">
{{ comment['comment'].author.display_name() }}</a> {{ comment['comment'].author.display_name() }}</a>