From 0ac1def5c283d3dfd49ada955a5eede60574d5f0 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Wed, 4 Feb 2026 16:50:23 +0000 Subject: [PATCH] Optimize avatar image loading with lazy and async attributes Added `loading="lazy"` and `decoding="async"` to author avatar images in `VideoCard.js` and the creator avatar in `video-modal.html`. This aligns these components with `SimilarContentCard.js` and `VideoCard` thumbnails, improving initial page load performance and reducing main-thread blocking by deferring off-screen image loading and decoding. Co-authored-by: PR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> --- components/video-modal.html | 2 ++ js/ui/components/VideoCard.js | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/components/video-modal.html b/components/video-modal.html index 5d89500b..93054a25 100644 --- a/components/video-modal.html +++ b/components/video-modal.html @@ -503,6 +503,8 @@ id="creatorAvatar" src="" alt="Creator" + loading="lazy" + decoding="async" class="h-full w-full rounded-full object-cover cursor-pointer" /> diff --git a/js/ui/components/VideoCard.js b/js/ui/components/VideoCard.js index 576db2ba..859bd3a1 100644 --- a/js/ui/components/VideoCard.js +++ b/js/ui/components/VideoCard.js @@ -904,7 +904,9 @@ export class VideoCard { const avatar = this.createElement("img", { attrs: { src: "assets/svg/default-profile.svg", - alt: "Placeholder" + alt: "Placeholder", + loading: "lazy", + decoding: "async", } }); avatar.classList.add(