Skip to content

A platform for community discussion. Free, open, simple.

Add lazy loading to post avatars

Joec0cbfcc54870
diff --git a/app/assets/javascripts/discourse/app/widgets/post.js b/app/assets/javascripts/discourse/app/widgets/post.js
index c7e3947caff..3f3a0ceadc8 100644
--- a/app/assets/javascripts/discourse/app/widgets/post.js
+++ b/app/assets/javascripts/discourse/app/widgets/post.js
@@ -58,6 +58,7 @@ export function avatarImg(wanted, attrs) {
src: getURLWithCDN(url),
title,
"aria-label": title,
+ loading: "lazy",
},
className,
};