From c50e0edcb80c92d3048263b16b05deaa05148d33 Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Wed, 14 Aug 2024 12:53:42 +0200 Subject: [PATCH] feat(gallery): lazy load images (#3246) Signed-off-by: Ettore Di Giacinto --- core/http/elements/gallery.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/http/elements/gallery.go b/core/http/elements/gallery.go index 575ea87d..91a12310 100644 --- a/core/http/elements/gallery.go +++ b/core/http/elements/gallery.go @@ -501,8 +501,9 @@ func ListModels(models []*gallery.GalleryModel, processTracker ProcessTracker, g }, elem.Img(attrs.Props{ // "class": "rounded-t-lg object-fit object-center h-96", - "class": "rounded-t-lg max-h-48 max-w-96 object-cover mt-3", - "src": m.Icon, + "class": "rounded-t-lg max-h-48 max-w-96 object-cover mt-3", + "src": m.Icon, + "loading": "lazy", }), ), ),