From 47e7e9572cb09ee409616b93789fba90c5b1df28 Mon Sep 17 00:00:00 2001 From: Opliko <25460763+oplik0@users.noreply.github.com> Date: Sun, 19 Apr 2020 15:29:14 +0200 Subject: [PATCH] Add loading=lazy tag to avatars There is no reason why avatars should be a blocking reasorce, and browsers are now adding support for lazy loading of images (and iframes). According to [caniuse.com](https://caniuse.com/#feat=loading-lazy-attr) 62% of users use a browser that supports this attribute. So there doesn't seem to be any downside to just adding this attribute here. It won't affect browsers that don't support it and might speed up page loads on browsers that do. --- public/src/modules/helpers.js | 1 + 1 file changed, 1 insertion(+) diff --git a/public/src/modules/helpers.js b/public/src/modules/helpers.js index 943316bfd3..994d062f89 100644 --- a/public/src/modules/helpers.js +++ b/public/src/modules/helpers.js @@ -287,6 +287,7 @@ 'alt="' + userObj.username + '"', 'title="' + userObj.username + '"', 'data-uid="' + userObj.uid + '"', + 'loading="lazy"', ]; var styles = []; classNames = classNames || '';