diff options
author | mms <michal@sapka.me> | 2024-06-28 14:57:08 +0200 |
---|---|---|
committer | mms <michal@sapka.me> | 2024-06-28 14:57:08 +0200 |
commit | d6ac0fc244cc0666bae99833c7e5e835308b9eb9 (patch) | |
tree | 7b8db2a69ca69614d86eedeb54a2b4faaad96667 /layouts/partials/blog/cross-site-post.html | |
parent | 9566717e717438cee59e6f251a8234b5164f56b5 (diff) |
chore: lazy load content images
Diffstat (limited to 'layouts/partials/blog/cross-site-post.html')
-rw-r--r-- | layouts/partials/blog/cross-site-post.html | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/layouts/partials/blog/cross-site-post.html b/layouts/partials/blog/cross-site-post.html index 3a13af8..2a9f77b 100644 --- a/layouts/partials/blog/cross-site-post.html +++ b/layouts/partials/blog/cross-site-post.html @@ -16,15 +16,16 @@ {{- $img2x := $img.Resize "64x webp" }} <div class="img"> <a href="{{ .Permalink }}"><img - alt="Arrow" - src="{{ $img1x.Permalink }}" - srcset=" - {{ $img1x.Permalink }} 1x, - {{ $img2x.Permalink }} 2x - " - width="{{ $img1x.Width }}" - height="{{ $img1x.Height }}" - ></a> + alt="Arrow" + loading="lazy" + src="{{ $img1x.Permalink }}" + srcset=" + {{ $img1x.Permalink }} 1x, + {{ $img2x.Permalink }} 2x + " + width="{{ $img1x.Width }}" + height="{{ $img1x.Height }}" + ></a> </div> <div class="text"> <time datetime="{{.PublishDate.Format "2006-01-02" }}"> @@ -33,5 +34,5 @@ I published <a href="{{ .Permalink }}">"{{ .Title }}"</a> on {{ $section }} - </div> + </div> </article> |