From 61b752832811d85b844577e3b41a5798585543c2 Mon Sep 17 00:00:00 2001 From: rimu <3310831+rimu@users.noreply.github.com> Date: Sun, 17 Mar 2024 16:35:26 +1300 Subject: [PATCH] lightbox - lazy images when we know the width and height --- app/templates/post/_post_teaser_masonry.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/templates/post/_post_teaser_masonry.html b/app/templates/post/_post_teaser_masonry.html index ad9df74f..021c9c10 100644 --- a/app/templates/post/_post_teaser_masonry.html +++ b/app/templates/post/_post_teaser_masonry.html @@ -15,7 +15,7 @@ {% if post.image.medium_url() %} {{ post.image.alt_text if post.image.alt_text else '' }} + loading="lazy" width="{{ post.image.width }}" height="{{ post.image.height }}" /> {% elif post.image.source_url %} {{ post.title }} @@ -27,7 +27,7 @@ {% elif post.type == POST_TYPE_IMAGE %} {{ post.image.alt_text if post.image.alt_text else '' }} + loading="lazy" width="{{ post.image.width }}" height="{{ post.image.height }}" /> {% else %} {{ post.image.alt_text if post.image.alt_text else '' }}