How to Identify the LCP Element on Your Page
Learn how to find the Largest Contentful Paint element using Chrome DevTools, the Web Vitals extension, PageSpeed Insights, and the Performance Observer API.
Detailed Explanation
Identifying Your LCP Element
The first step in optimizing LCP is knowing which element is the LCP candidate. Without this information, you may optimize the wrong resource.
Method 1: Chrome DevTools Performance Panel
- Open Chrome DevTools (F12)
- Go to the Performance panel
- Click the record button and reload the page
- Stop recording after the page loads
- In the Timings section, look for the LCP marker
- Hover over it to see the element highlighted on the page
- Click it for detailed timing information
Method 2: Web Vitals Chrome Extension
Install the Web Vitals extension from the Chrome Web Store. After page load, click the extension icon to see your LCP value and the element that triggered it.
Method 3: Performance Observer API
const observer = new PerformanceObserver((list) => {
const entries = list.getEntries();
const lastEntry = entries[entries.length - 1];
console.log('LCP element:', lastEntry.element);
console.log('LCP time:', lastEntry.startTime);
console.log('LCP size:', lastEntry.size);
console.log('LCP URL:', lastEntry.url);
});
observer.observe({ type: 'largest-contentful-paint', buffered: true });
Method 4: PageSpeed Insights
Run your URL through PageSpeed Insights (pagespeed.web.dev). The diagnostics section will identify the LCP element and show its load timing breakdown.
Common LCP Elements by Page Type
| Page Type | Typical LCP Element |
|---|---|
| E-commerce PDP | Hero product image |
| Blog / Article | Featured image or H1 text |
| Landing Page | Hero banner image or video poster |
| Dashboard | Large data table or chart |
| Search Results | First result card text |
LCP Candidates
Not every element is eligible to be an LCP candidate. Valid LCP elements include:
<img>elements<image>inside SVG<video>poster images- Elements with
background-imageloaded viaurl() - Block-level elements containing text nodes
Use Case
Identifying the LCP element is the essential first step for any performance optimization project. Before investing time in image compression, preloading, or server optimization, you need to know what the browser considers the largest contentful paint. Different pages on the same site may have different LCP elements — a homepage might have a hero image while a blog post might have an H1 heading.
Try It — Web Vitals Reference
Related Topics
LCP Optimization Strategies — Largest Contentful Paint Guide
Core Web Vitals
Image Optimization for LCP — Formats, Preloading, and Responsive Images
Optimization
Performance Monitoring Tools for Web Vitals
Tools & Workflow
TTFB Optimization — Time to First Byte Best Practices
Supplementary Metrics
FCP First Contentful Paint Guide — Measuring Initial Render
Supplementary Metrics