Skip to content

Improve LCP on School Details Page #822

Description

@sanaderi

The School Details page currently has a poor Largest Contentful Paint (LCP) score, which negatively impacts Core Web Vitals, SEO, and user experience.

Initial investigation suggests that the main hero/content section (school header/info block) is loading too slowly and is likely being counted as the LCP element.


Goal

Reduce LCP on the School Details page to meet Google Core Web Vitals recommendations
(Target: LCP < 2.5s on mobile & desktop)


Tasks

Identify LCP Element

  • Use Lighthouse / Chrome DevTools to confirm the exact LCP element
  • Document current LCP timing and element

Frontend Optimizations

  • Lazy-load non-critical components below the fold
  • Ensure school hero section renders immediately
  • Reduce blocking JS/CSS
  • Defer non-essential scripts
  • Preload critical fonts
  • Optimize images (especially school logo / banner)
  • Add explicit width / height for images to avoid layout shift

Data & Rendering

  • Minimize API payload for initial render
  • Avoid waiting for non-critical API calls before showing main content
  • Consider skeleton/loading placeholder for school header
  • Review SSR / hydration timing (if applicable)

Assets

  • Compress images (WebP/AVIF if possible)
  • Enable CDN caching for school images
  • Add priority loading for LCP image

Acceptance Criteria

  • LCP ≤ 2.5s in Lighthouse (mobile)
  • School header visible almost instantly
  • No layout shift on initial load
  • Lighthouse performance score improved
  • Before/after metrics documented

Notes

This task focuses only on School Details page.
Other pages are out of scope.

@alireza013013

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

Projects

Status
In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions