diff options
author | Kromonos | 2022-12-18 01:01:07 +0100 |
---|---|---|
committer | GitHub | 2022-12-17 17:01:07 -0700 |
commit | f02f1541add5242e13abf8852d381458315ecaab (patch) | |
tree | bd7b934b860320934ed541fd0e85e70e5c5281e3 /templates/activities/_post.html | |
parent | 17d75c4797b43767a58edfefd8473826334aa416 (diff) | |
download | takahe-f02f1541add5242e13abf8852d381458315ecaab.tar.gz takahe-f02f1541add5242e13abf8852d381458315ecaab.tar.bz2 takahe-f02f1541add5242e13abf8852d381458315ecaab.zip |
Implement lazy loading (#188)
Diffstat (limited to 'templates/activities/_post.html')
-rw-r--r-- | templates/activities/_post.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/templates/activities/_post.html b/templates/activities/_post.html index 990e457..cd6024c 100644 --- a/templates/activities/_post.html +++ b/templates/activities/_post.html @@ -3,7 +3,7 @@ <div class="post {% if reply %}reply{% endif %}" data-takahe-id="{{ post.id }}" role="article" tabindex="0"> <a href="{{ post.author.urls.view }}" tabindex="-1"> - <img src="{{ post.author.local_icon_url.relative }}" class="icon"> + <img src="{{ post.author.local_icon_url.relative }}" class="icon" loading="lazy"> </a> <time _="on click go url {% if link_original %}{{ post.url }}{% else %}{{ post.urls.view }}{% endif %} then halt"> @@ -79,7 +79,7 @@ {% for attachment in post.attachments.all %} {% if attachment.is_image %} <a href="{{ attachment.full_url.relative }}" class="image"> - <img src="{{ attachment.thumbnail_url.relative }}" title="{{ attachment.name }}" alt="{{ attachment.name }}" /> + <img src="{{ attachment.thumbnail_url.relative }}" title="{{ attachment.name }}" alt="{{ attachment.name }}" loading="lazy" /> </a> {% endif %} {% endfor %} |