From 1a831eddc5be45a9628efc36b53b76cbe27084ef Mon Sep 17 00:00:00 2001 From: Aitor Date: Thu, 30 Nov 2023 11:02:37 +0100 Subject: [PATCH] :zap: Lazy load dashboard grid images --- frontend/src/app/main/ui/dashboard/grid.cljs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/frontend/src/app/main/ui/dashboard/grid.cljs b/frontend/src/app/main/ui/dashboard/grid.cljs index 777517789..96ff30aa8 100644 --- a/frontend/src/app/main/ui/dashboard/grid.cljs +++ b/frontend/src/app/main/ui/dashboard/grid.cljs @@ -90,7 +90,9 @@ (when visible? (if thumbnail-uri [:img {:class (stl/css :grid-item-thumbnail-image) - :src thumbnail-uri}] + :src thumbnail-uri + :loading "lazy" + :decoding "async"}] i/loader-pencil))] ;; OLD @@ -99,7 +101,9 @@ :ref container} (when visible? (if thumbnail-uri - [:img.grid-item-thumbnail-image {:src thumbnail-uri}] + [:img.grid-item-thumbnail-image {:src thumbnail-uri + :loading "lazy" + :decoding "async"}] i/loader-pencil))]))) ;; --- Grid Item Library @@ -474,7 +478,7 @@ (when (and (:is-shared file) (not library-view?)) [:div {:class (stl/css :item-badge)} i/library]) - + [:div {:class (stl/css :info-wrapper)} [:div {:class (stl/css :item-info)} (if (:edition @local)