Skip to content

Commit

Permalink
feat(gallery): lazy load images (#3246)
Browse files Browse the repository at this point in the history
Signed-off-by: Ettore Di Giacinto <[email protected]>
  • Loading branch information
mudler authored Aug 14, 2024
1 parent d6c4e75 commit c50e0ed
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions core/http/elements/gallery.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
}),
),
),
Expand Down

0 comments on commit c50e0ed

Please sign in to comment.