Skip to content

Phase 2: Add conservative lazy-loading and intrinsic sizes to avatars… - #6

Merged
Rodern merged 1 commit into
masterfrom
phase2/image-lazy-loading
Aug 24, 2026
Merged

Phase 2: Add conservative lazy-loading and intrinsic sizes to avatars…#6
Rodern merged 1 commit into
masterfrom
phase2/image-lazy-loading

Conversation

@Rodern

@Rodern Rodern commented Aug 24, 2026

Copy link
Copy Markdown
Member

This PR adds conservative lazy-loading (loading="lazy") to avatar and thumbnail elements across the UI and adds width/height attributes where inline styles already specified explicit pixel sizes to reduce Cumulative Layout Shift (CLS).

What changed

Added loading="lazy" to list avatars and thumbnails in Customers, Users, Employees, Suppliers, Loyalty, Profile, and relevant JS templates.
Added width and height attributes for images that already had inline size styles (32x32 and 56x56) to provide intrinsic sizing and help prevent layout shifts.
Did NOT modify modal/fullsize/cropper/global viewer images or brand logos; these were intentionally left unchanged.
Why

Improve page load performance by deferring non-critical image loads.
Reduce CLS by supplying intrinsic sizes for small avatars and thumbnails where pixel sizes were known.
Testing checklist

Build and run the app locally.
Verify avatars and thumbnails render correctly on Customers, Users, Employees, Suppliers, Loyalty, and Profile pages.
Check that interactive preview/cropper modals still show images immediately (we left those unchanged).

…/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>
@vercel

vercel Bot commented Aug 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
store-project Error Error Aug 24, 2026 3:54pm

@Rodern
Rodern merged commit 91ec8fe into master Aug 24, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant