First Contentful Paint
First Contentful Paint (FCP) is one of six metrics tracked in theĀ PerformanceĀ section of the Lighthouse report. Each metric captures some aspect of page load speed.
Lighthouse displays FCP in seconds:
What FCP measures
FCP measures how long it takes the browser to render the first piece of DOM content after a user navigates to your page. Images, non-whiteĀ <canvas>
Ā elements, and SVGs on your page are considered DOM content; anything inside an iframeĀ isn'tĀ included.
How to improve your FCP score
One issue that's particularly important for FCP is font load time. Check out theĀ Ensure text remains visible during webfont loadĀ post for ways to speed up your font loads.
Tracking FCP on real users' devices
To learn how to measure when FCP actually occurs on your users' devices, see Google'sĀ User-centric Performance MetricsĀ page. TheĀ Tracking FP/FCPĀ section describes how to programmatically access FCP data and submit it to Google Analytics.
See Google'sĀ Assessing Loading Performance in Real Life with Navigation and Resource TimingĀ for more on collecting real-user metrics.
How to improve your overall Performance score
Unless you have a specific reason for focusing on a particular metric, it's usually better to focus on improving your overall Performance score.
Use theĀ OpportunitiesĀ section of your Lighthouse report to determine which improvements will have the most value for your page. The more significant the opportunity, the greater the effect it will have on your Performance score. For example, the Lighthouse screenshot below shows thatĀ eliminating render-blocking resourcesĀ will yield the biggest improvement:
Ā
Ā
Every single page can have its LCP value broken down into these four sub-parts. There is no overlap or gap between them, and collectively they add up to the full LCP time.
When optimizing LCP, it's helpful to try to optimize these sub-parts individually. But it's also important to keep in mind that you need to optimize all of them. In some cases, an optimization applied to one part will not improve LCP, it will just shift the time saved to another part.
For example, in the earlier network waterfall, if you reduced the file size of our image by compressing it more or switching to a more optimal format (such as AVIF or WebP), that would reduce theĀ resource load time, but it would not actually improve LCP because the time would just shift to theĀ element render delayĀ sub-part: