Skip to content

Conversation

@HarshJS30
Copy link
Contributor

@HarshJS30 HarshJS30 commented Nov 9, 2025

Problem

Homepage performance score was 58/100 due to oversized images (≈3.2 MB total) and unoptimized font loading behavior.

Changes

  • Images: Resized hero & carousel assets to match real display dimensions and re-compressed as optimized WebP.

    • learn.webp: 3,063 KB → 59 KB
    • teach2.webp: 794 KB → 27 KB
    • discuss.webp: 315 KB → 52 KB
    • teach.webp: 247 KB → 134 KB
    • teach1.webp: 149 KB → 47 KB
    • → Total image payload reduced from ~3.2 MB → ~319 KB (-90%)
  • Fonts: Added font-display: swap for all custom fonts (Inter, Roboto, Pacifico, Caveat, AnonymousPro, Oswald) to improve text paint speed and prevent FOIT (Flash of Invisible Text).

  • Build Config (Vite):

    • Set build.target'esnext' to serve modern JS only.
    • Ensures smaller bundles and faster parse times.

Results (Desktop Lighthouse)

Metric Before After Improvement
Performance 58 71 +22%
FCP 1.7 s 1.2 s ↓ 30%
LCP 2.9 s 1.6 s ↓ 45%
TBT 540 ms 410 ms ↓ 25%
CLS 0 0
Total Payload ~9.5 MB ~1.8 MB ↓ 80% overall

Testing

  • ✅ Verified using npm run buildserve -s dist
  • ✅ Confirmed responsive behavior on desktop, tablet, and mobile
  • ✅ No layout shifts or visual regressions detected

Before / After Screenshots
Before: 58
After: 71


Summary:
This PR significantly improves homepage performance and loading experience by optimizing core assets and modernizing build output. Verified production improvements in LCP, FCP, and bundle efficiency. Open to any additional feedback or benchmarking suggestions.

@github-actions
Copy link

github-actions bot commented Nov 9, 2025

🎉 All Checks Passed!

Status: ✅ Ready to merge

✅ Completed Workflows

Workflow Status Details
🔨 Continuous Integration ✅ Passed Build completed successfully
📝 Code Linting ✅ Passed All formatting and style checks passed

🚀 This PR is ready for review and can be safely merged to main branch!

Great work! Your code meets all quality standards. 👏

@HarshJS30
Copy link
Contributor Author

Hey @sa-fw-an, Can you please review this when you get a chance? If the approach looks good, I'd love to work on improving performance for the rest of the pages as well.
Thanks for your time :p

@sa-fw-an sa-fw-an closed this Nov 15, 2025
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.

2 participants