0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-04-05 19:41:27 -05:00

Lazy load dashboard grid images

This commit is contained in:
Aitor 2023-11-30 11:02:37 +01:00 committed by Andrey Antukh
parent a397f25cb2
commit 1a831eddc5

View file

@ -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)