From 2082677cd146bee78bf566c4c2b4fb57e1a5d6a3 Mon Sep 17 00:00:00 2001 From: Alain Kimbu Date: Mon, 24 Aug 2026 16:44:31 +0100 Subject: [PATCH] Phase 2: Add conservative lazy-loading and intrinsic sizes to avatars/thumbnails Add loading="lazy" to list avatars and thumbnails where safe, and add width/height attributes when inline styles already specify sizes to reduce CLS. Leave modal/preview/fullsize images and brand logos unchanged for safety. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- Store.UI/Pages/Customers.cshtml | 6 +++--- Store.UI/Pages/Employees.cshtml | 4 ++-- Store.UI/Pages/Loyalty.cshtml | 2 +- Store.UI/Pages/Profile.cshtml | 2 +- Store.UI/Pages/Shared/_AppLayout.cshtml | 2 +- Store.UI/Pages/Suppliers.cshtml | 6 +++--- Store.UI/Pages/Users.cshtml | 2 +- Store.UI/wwwroot/js/site.js | 2 +- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Store.UI/Pages/Customers.cshtml b/Store.UI/Pages/Customers.cshtml index 46ebf2d..3087908 100644 --- a/Store.UI/Pages/Customers.cshtml +++ b/Store.UI/Pages/Customers.cshtml @@ -840,7 +840,7 @@
@if (!string.IsNullOrEmpty(c.ThumbnailUrl)) { - @c.FullName + @c.FullName } else { @@ -943,7 +943,7 @@ @if (!string.IsNullOrEmpty(c.ThumbnailUrl)) { - @c.FullName + @c.FullName } else { @@ -1511,7 +1511,7 @@ async function openDrawer(customerId) { const avatarWrap = document.getElementById('drawerAvatarWrap'); if (c.thumbnailUrl) { - avatarWrap.innerHTML = `${c.fullName}`; + avatarWrap.innerHTML = `${c.fullName}`; } else { avatarWrap.innerHTML = `
${initials}
`; } diff --git a/Store.UI/Pages/Employees.cshtml b/Store.UI/Pages/Employees.cshtml index 8c6e1c7..e940e4a 100644 --- a/Store.UI/Pages/Employees.cshtml +++ b/Store.UI/Pages/Employees.cshtml @@ -73,7 +73,7 @@ @if (!string.IsNullOrEmpty(e.ThumbnailUrl)) { - Photo + Photo } else { @@ -360,7 +360,7 @@ const initials = (c.fullName || 'EM').split(' ').map(s => s[0]).slice(0, 2).join(''); const avatarWrap = document.getElementById('drawerAvatarWrap'); if (c.thumbnailUrl) { - avatarWrap.innerHTML = `${c.fullName}`; + avatarWrap.innerHTML = `${c.fullName}`; } else { avatarWrap.innerHTML = `
${initials}
`; } diff --git a/Store.UI/Pages/Loyalty.cshtml b/Store.UI/Pages/Loyalty.cshtml index ced492a..f589eca 100644 --- a/Store.UI/Pages/Loyalty.cshtml +++ b/Store.UI/Pages/Loyalty.cshtml @@ -896,7 +896,7 @@
@if (!string.IsNullOrWhiteSpace(m.ThumbnailUrl)) { - @m.FullName + @m.FullName } else { diff --git a/Store.UI/Pages/Profile.cshtml b/Store.UI/Pages/Profile.cshtml index a4bd1ce..c2176c7 100644 --- a/Store.UI/Pages/Profile.cshtml +++ b/Store.UI/Pages/Profile.cshtml @@ -196,7 +196,7 @@
@if (!string.IsNullOrEmpty(Model.CurrentAvatarPath)) { - Avatar + Avatar } else { diff --git a/Store.UI/Pages/Shared/_AppLayout.cshtml b/Store.UI/Pages/Shared/_AppLayout.cshtml index 65dddd2..abbaf1c 100644 --- a/Store.UI/Pages/Shared/_AppLayout.cshtml +++ b/Store.UI/Pages/Shared/_AppLayout.cshtml @@ -157,7 +157,7 @@