Description
Currently, several large assets (such as logo.png and other UI graphics) may be loaded synchronously using standard <img> tags or unoptimized CSS backgrounds. This causes a significant delay in the Largest Contentful Paint (LCP) and negatively impacts the overall Lighthouse performance score of the DevPath-Web application.
Proposed Solution
- Migrate to next/image: Replace all standard
<img> tags with the next/image component to leverage automatic image optimization (WebP/AVIF conversion, resizing, and caching).
- Implement Lazy Loading: Ensure that images below the fold have the
loading="lazy" attribute (or rely on next/image's default behavior).
- Preload Critical Assets: Explicitly add the
priority attribute to the LCP element (e.g., the hero banner or main logo) so it is fetched early in the network waterfall.
Benefits
- Substantially improved page load speeds, particularly on mobile devices.
- Better SEO ranking due to higher Core Web Vitals scores.
Suggested labels: gssoc, quality:exceptional, level:intermediate, type:performance, area:frontend
Description
Currently, several large assets (such as
logo.pngand other UI graphics) may be loaded synchronously using standard<img>tags or unoptimized CSS backgrounds. This causes a significant delay in the Largest Contentful Paint (LCP) and negatively impacts the overall Lighthouse performance score of the DevPath-Web application.Proposed Solution
<img>tags with thenext/imagecomponent to leverage automatic image optimization (WebP/AVIF conversion, resizing, and caching).loading="lazy"attribute (or rely onnext/image's default behavior).priorityattribute to the LCP element (e.g., the hero banner or main logo) so it is fetched early in the network waterfall.Benefits
Suggested labels:
gssoc,quality:exceptional,level:intermediate,type:performance,area:frontend