feat(gallery): lazy load images (#3246)

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
Ettore Di Giacinto 2024-08-14 12:53:42 +02:00 committed by GitHub
parent d6c4e751f2
commit c50e0edcb8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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",
}),
),
),