matrix-art

An image gallery for Matrix
git clone git://archive.git.mtrnord.blog/MTRNord/matrix-art.git
Log | Files | Refs | README | LICENSE

commit c4c8a102a3a165180e2779d89097cfdefbb7836a
parent 124e795fe0bf1da010bd06e608d643fc6683e269
Author: MTRNord <mtrnord1@gmail.com>
Date:   Mon, 18 Apr 2022 23:34:51 +0200

Add lazy loading and async decoding to images

Diffstat:
Msrc/components/post.tsx | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/components/post.tsx b/src/components/post.tsx @@ -15,7 +15,7 @@ export class Post extends PureComponent<Props> { return ( <div class="flex flex-col"> <a id="gallery_click" href={post.content.file.url} class="w-full" target="_blank" rel="noreferrer"> - <img class="rounded-3xl shadow object-cover transform transition-transform ease-in-out duration-300 hover:scale-105" src={post.content.file.url} /> + <img decoding="async" loading="lazy" class="rounded-3xl shadow object-cover transform transition-transform ease-in-out duration-300 hover:scale-105" src={post.content.file.url} /> </a> <div class="flex items-center justify-between py-4"> <a class="flex items-center" href="#">