0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-12 07:41:43 -05:00

Add lazy loading and async decoding to graphics

This commit is contained in:
Aitor 2023-08-29 11:03:11 +02:00 committed by Andrey Antukh
parent 9ce8c2d580
commit 0721fc9d80

View file

@ -140,6 +140,8 @@
(when visible?
[:*
[:img {:src (when visible? (cf/resolve-file-media object true))
:loading "lazy"
:decoding "async"
:draggable false}] ;; Also need to add css pointer-events: none
(let [renaming? (= renaming (:id object))]