🚀PageSpeed Insights & Core Web Vitals
How Hugo integrates Google PageSpeed Insights to measure Lighthouse performance, Core Web Vitals, and optimization opportunities.
Hugo integrates directly with Google's PageSpeed Insights API v5 to deliver real Lighthouse performance data. This goes beyond the static HTML checks in the standard Performance category — it actually loads your page in a headless Chrome browser and measures real-world performance metrics.[1] This Premium check adds 5% weight to your overall score.
Lighthouse Performance Score
The Lighthouse performance score (0–100) is a weighted combination of the five Core Web Vitals metrics.[2] This is the same score you'd get from Chrome DevTools or web.dev/measure.
Lighthouse Performance (score)
Core Web Vitals
Core Web Vitals are Google's specific metrics for measuring real-world user experience. They've been part of Google's page experience ranking signal since June 2021.[3] Here's what each measures:
Largest Contentful Paint (LCP)
LCP measures how quickly the largest visible content element (image, video, or text block) loads.[4] It directly reflects perceived loading speed.
LCP (seconds)
First Contentful Paint (FCP)
FCP measures when the browser first renders any content (text, image, SVG, canvas).[5] It indicates when the user first sees something happening.
FCP (seconds)
Total Blocking Time (TBT)
TBT measures the total time the main thread was blocked by long tasks (>50ms) between FCP and Time to Interactive.[6] High TBT means the page feels unresponsive to user input.
TBT (ms)
Cumulative Layout Shift (CLS)
CLS measures visual stability — how much page content shifts during loading.[7] Unexpected layout shifts frustrate users, especially on mobile.
CLS (score)
Speed Index
Speed Index measures how quickly content is visually populated during page load. A lower score means content appears faster.
Speed Index (seconds)
Optimization Opportunities
Beyond metrics, PageSpeed Insights identifies specific optimization opportunities with estimated savings. Hugo surfaces these as actionable recommendations, including:
- Render-blocking resources — CSS and JS that delay first paint
- Unused CSS/JavaScript — Code downloaded but never executed
- Modern image formats — Using WebP or AVIF instead of JPEG/PNG
- Offscreen images — Images not in the viewport that could be lazy-loaded
- Text compression — Enabling gzip or Brotli for text assets
- HTTP/2 — Modern protocol with multiplexing for faster parallel downloads
- DOM size — Excessively large DOM trees that slow rendering
References
- [1]Google Developers — PageSpeed Insights API v5 — developers.google.com
- [2]Chrome Developers — Lighthouse performance scoring — developer.chrome.com
- [3]Google Search Central — Understanding page experience in Google Search results — developers.google.com
- [4]web.dev — Largest Contentful Paint (LCP) — web.dev
- [5]web.dev — First Contentful Paint (FCP) — web.dev
- [6]web.dev — Optimize Total Blocking Time — web.dev
- [7]web.dev — Cumulative Layout Shift (CLS) — web.dev