Skip to main content

Largest Contentful Paint (LCP)

core web vitals frontend
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

What Is Largest Contentful Paint (LCP)?

Largest Contentful Paint (LCP) is a Core Web Vitals metric that measures how long it takes a website to render the largest part of the content on the screen. In most cases, LCP refers to the content above the fold rather than the entire page.

Google defines that the largest contentful paint only counts the loading type of the following resources:

  • Images (and tags)
  • Backgrounds via URL
  • Text elements
  • Video elements

Why Is LCP Important?

Largest contentful paint is an important metric, especially when it comes to user experience, as it measures the perceived load speed of a website and marks the time when the main content of the page is fully loaded. Whenever the LCP is delayed, users take note immediately and might portray your website as a slow website, in which case they might decide to search elsewhere.

The Largest Contentful Paint is also important for search engine optimization (SEO). Google considers the LCP as part of the Core Web Vitals and is a vital parameter that feeds the search algorithm. Since LCP is directly related to page load time, it will affect user experience, which means that Google will use this metric when calculating the website ranking.

What Is a Good LCP Score?

A good LCP score to aim at is the 2.5 seconds mark or less. Web.dev recommends hitting that target for most users across both mobile and desktop devices.

How to Measure Largest Contentful Paint?

There are several ways to measure your largest contentful paint. The most common one is using the Page Speed insights. It’s a solid option with detailed information on your largest contentful paint and other useful metrics. The main drawback is that it’s labor-intensive since you have to manually run the test every time you want to see your LCP score.

The better option would be to use a third-party tool. It can measure and monitor contentful paint and other key metrics without wasting precious time running tests and collecting data.

How to Optimize Largest Contentful Paint?

There are several ways to optimize the largest contentful paint and this is something worth doing as a routine, especially for dynamic websites or websites that rely on a lot of third parties. Here are some of the most common ones:

Optimize Images

Images play a significant role in defining your largest contentful paint and you should make sure you optimize them first. You can resize and compress them to reduce their size. Whenever possible, use WebP, an image format that employs both lossy and lossless compression and supports animation and alpha transparency.

Use a Content Delivery Network (CDN)

Using a CDN will not only load your images faster but also speed up your website regardless of where your users will access your website from. Most CDNs will have dedicated servers all around the world, which makes transfers a lot faster.

Optimize Your Code

Render blocking code can be the culprit in many cases where the LCP is slow. Your JavaScript could be blocking the loading of important content that would have otherwise been loaded already. Large CSS and script files can also lead to a slow LCP so it’s important to minimize them and remove unnecessary code as much as possible.

Monitoring Largest Contentful Paint with Sematext

Sematext has two great solutions to measure your Largest Contentful Paint. One is Sematext Synthetic, a synthetic monitoring tool which creates simulated transactions that text your page from different locations across the world and at predefined intervals. The other is a real user monitoring tool, Sematext Experience, which records real-life interactions of your users with the website.

While both solutions are great on their own, the real benefits come from using them together. They make a website monitoring service that provides a well-rounded idea of how your website is performing in all possible situations.

Start free trial


See Also

Stay up to date

Get tips, how-tos, and news about Elastic / ELK Stack, Observability, Solr, and Sematext Cloud news and updates.

Sematext Newsletter
Create Status Page with Synthetics! Learn more