Oleg
Chursin
WorkNotesPhotography
How LCP is computed

Which element becomes LCP, how its size and timestamp are worked out, when the browser stops looking, and what happened to the cross-origin render-time problem.

Contents · 11 sections

Take two pages that load the same hero photo from the same CDN. On the first, the photo is the LCP element. On the second, the user taps a cookie banner before the photo arrives, so the LCP element is the heading that painted a few hundred milliseconds earlier, and the reported LCP is lower by however long the photo took. Make the photo cover the whole viewport and the heading wins again. Render it inside a web component and the entry's element is null. None of these are bugs. Each one has a counterpart in the test pages at the end of this piece, and each is the algorithm doing what it says.

The usual one-line definition, "the render time of the largest image, text block, or video visible in the viewport", is the summary in web.dev's LCP article, and it hides nearly everything that decides the number. Which elements count, how "largest" is measured, what "render time" means when the frame is presented on another thread, when the browser stops looking, and what a cross-origin image is allowed to reveal are all written down in three W3C drafts. Chrome then deviates from those drafts in a handful of places that its own source code admits.

This piece walks through the algorithm as specified today, says where Chrome differs, and backs both with a small test harness I ran on 18 October 2026. It assumes the vocabulary from the first part of this series: the 2.5-second threshold, p75, and the split between the spec, Chrome's implementation and CrUX. Every status fact below was checked on 18 October 2026.

LCP is a by-product of painting, not a timer of its own

LCP has no clock. It's a consumer of Paint Timing, and nothing happens for LCP except inside the browser's rendering update. The HTML Standard's update-the-rendering steps include, for each document, a call to mark paint timing, which the Paint Timing Editor's Draft (dated 14 October 2026) defines. That algorithm collects the images that are ready to paint and the elements whose text painted for the first time, and hands both sets to report largest contentful paint, which lives in the LCP Editor's Draft.

The LCP document has two published forms that currently match. The Editor's Draft and the W3C Working Draft are both dated 26 August 2026, with Yoav Weiss (Shopify) as editor. When I say "the spec" below I mean that text, plus the Paint Timing and Event Timing drafts it calls into.

Images queue up when they are completely available

Images don't become candidates when they're inserted, when they start downloading or when they're decoded. Paint Timing hooks the moment an element's image request "has become completely available", for <img>, SVG <image> and <video> posters, and the CSS equivalent for background images. At that point it runs process an image that finished loading, which stamps the current time as the record's loadTime and appends a pending image record to the document's images pending rendering list. Its first two steps matter later: if the element's root isn't a document, the algorithm returns and no record is ever made.

The record then waits. On the next rendering update, mark paint timing walks that list, and every record whose request is "available and ready to be painted" moves into this frame's set of painted images. So loadTime is the moment the bytes were usable, and the paint that matters is whatever frame follows it. On a busy main thread those can be far apart, which is the whole point of measuring render time rather than load time.

Text joins on first paint, unless its font is still blocking

Text takes a different path. The spec patches HTML so that when the user agent paints a Text node for the first time, the node is added to the set of owned text nodes of the element that determines its containing block. There's one exception, and it's the one that ties LCP to font loading: "If text will not be painted due to the font face being in its font block period, then return." Invisible text during a web font's block period isn't a candidate at all, so a slow font can delay a text LCP the same way a slow image delays an image LCP.

The "containing block" rule explains why a text LCP's element is usually a <p> or <h1> rather than a <span>. web.dev puts it plainly: every text node belongs to its closest block-level ancestor, and LCP measures the smallest rectangle containing all of that element's text nodes. A paragraph with a bold run inside it is one candidate, not two.

The entry waits for the frame to be presented

Presentation is the step that one-line definitions skip. Mark paint timing records a rendering update end time, then, if the browser supports presentation timestamps, it waits in parallel until the frame "has been presented to the user". It records that presentation time, coarsens it (more on that in the cross-origin section), and only then queues a task that runs the flush steps, including report largest contentful paint. The entry your PerformanceObserver sees is created after the pixels reached the screen, carrying both timestamps.

Fig. 1 traces one image through that pipeline, from completely available to queued entry, and shows the two places where the algorithm can bail out before an entry exists.

Two consequences fall out of this. First, LCP can never be earlier than the frame in which the content was painted, no matter how early the bytes arrived. Second, everything that delays a rendering update (long tasks, render-blocking resources, a hidden tab that isn't rendering at all) delays LCP directly. Measuring how much each of those contributes is the job of LCP subparts, which PRF-30 in this track covers.

A new entry needs strictly larger content, and removing content changes nothing

Report largest contentful paint starts by checking two flags (the next section), then calls compute a new largest contentful paint candidate. The document keeps a current largest contentful paint candidate. The algorithm walks this frame's painted images and then its painted text elements, computes each one's effective visual size, and keeps the biggest one that is strictly larger than the current candidate. If none beats it, the function returns null and no entry is queued. If one does, it becomes the new current candidate and an entry is queued.

That's why the entries you observe only ever grow in size. It's also why an entry's existence means "this was the largest thing so far" and nothing more. The last entry before the search stops is the LCP.

Chrome only matched this part of the spec this year. Until Chrome 147 (stable 7 April 2026, per Chromium Dash1), it compared each newly painted element against the largest pending image, one still downloading, so a slow hero suppressed entries for text that had already painted. The changelog says CrUX didn't change, because field metrics take the largest candidate at interaction or unload, but RUM scripts now see the intermediate candidates and, when the user interacts early, the candidate that actually painted.

Each element is offered to the algorithm once. The note above the algorithm says each painted image record and text element "will only be reported exactly once", on the first paint where it is paintable and contentful. web.dev states the consequence: changes to an element's size or position don't generate new candidates, so an image that starts off-screen and slides in may never be reported, and an element that later gets pushed out of view keeps its initial in-viewport size.

Disconnected, transparent and invisible content is skipped before sizing

Two filters run before size is even computed. An element must be exposed for paint timing: connected, in a fully active document, and with the document as its root. Text gets a second filter: text with an alpha channel or opacity of zero is skipped, unless it has a text-shadow, a stroke color or a stroke image. Chrome shipped its version as "Exclude transparent text" in Chrome 130, launched the week of 21 October 2024, and its changelog says the ecosystem impact was minimal and not statistically significant.

Opacity on ancestors comes in through timing rather than through a filter. The note above the LCP algorithm says each element is reported on the first paint where it is "paintable (i.e. has opacity and visibility)", and Paint Timing's definition of paintable requires the element and all its ancestors to have a used opacity greater than zero. That rule has a history in Chrome. Chrome 86 fixed a bug where content that started at opacity: 0 was timed from when it was loaded rather than when it became visible; the changelog names A/B testing frameworks that blank the page as the main affected pattern. Chrome 144 (stable 13 January 2026, per Chromium Dash) has a bug fix for LCP and FCP when document opacity changes from zero to non-zero.

The 3-pixel rule is new this year

Since April 2026 there's a second way to fail. After choosing a new candidate, if there was already one, the algorithm returns null when the new candidate's width minus the current candidate's width is 3 or less and its height difference is 3 or less. Yoav Weiss added it in w3c/largest-contentful-paint#160, merged on 8 April 2026, to fix issue #158: sub-pixel widths and heights let a late-loading image that looks identical to an earlier one "take over" the LCP value.

My reading of the text is that the rule compares rectangles, not areas, and that the differences are signed. A new candidate that is much narrower and only 3 pixels taller passes both comparisons and is suppressed, even if its area is larger. If the current candidate is a 1000 by 10 heading and a 950 by 13 image paints later, the image has 23% more area but produces no entry. That shape is unusual, but it's what the algorithm says. I also couldn't find the rule in Chromium's candidate code (see "What we don't know").

Removed content still counts

This rule produces the strangest-looking results. The spec's introduction says it directly: "Content that is removed is still considered by the algorithm. In particular, if the content removed was the largest, then a new entry is created only if larger content is ever added." Its limitations section gives the reason and the cost in two sentences: it's there "to account for image carousels", and it "presents problems for websites with splash screens that use large content as placeholders".

Chrome adopted this in Chrome 88 (stable 19 January 2021, per Chromium Dash). The Chrome 88 definition change says that before it, removing the current candidate made Chrome immediately pick a new one from what remained, and after it, "the LCP entries should have size values that only increase over time". The changelog names carousels and server-rendered frameworks that insert same-sized images more than once as the patterns that improved.

The carousel and splash cases behave differently, and the difference is entirely size. In a carousel that swaps a slide for a larger one, the larger slide is a new, bigger candidate and gets an entry. In a splash screen that's bigger than the real content, the real content never beats it, so the splash stays LCP. A splash that's smaller than your hero is harmless; one that's larger freezes LCP at the moment the splash painted, which can make a slow page look fast.

Chrome adds a wrinkle. Chromium's main branch, in largest_contentful_paint_calculator.cc, skips records whose node was removed from the DOM before the frame was reported, with a TODO (crbug 454082773) saying Chrome "should consider allowing these" because they were shown to the user and that "better matches the LCP spec". So content removed after it became the candidate keeps its place, but content removed between painting and reporting doesn't get one in Chrome.

Shadow DOM is where engines disagree

Two steps in the spec check the element's root: process an image that finished loading returns early when the root isn't a document, and exposed for paint timing returns false. Read literally, both exclude anything inside a shadow root, because a shadow tree's root is the shadow root. Whether that's intended is an open question in w3c/largest-contentful-paint#152, opened in November 2025. In that thread, WebKit's Simon Fraser reports implementing LCP from shadow DOM and then reverting it, because "it's not at all clear from the specs if this should work", and he points at those same two steps. Chrome's Michal Mocny describes Chromium's behavior: contentful paints from shadow DOM are reported for LCP, with the element filtered out. Anne van Kesteren and Ryosuke Niwa argue the other way, that shadow trees shouldn't be revealed without an opt-in.

So if your hero is rendered by a web component into a shadow root, Chrome will count it but won't tell you which element it was. My test page with an <img> inside an open shadow root got an entry with element: null in all 20 runs. Attribution code that keys on entry.element needs a fallback, and entry.url (which still carries the image URL) is the obvious one.

Effective visual size is smaller than the box you see

"Largest" means largest effective visual size, defined in §4.3 of the LCP draft. It's a sequence of reductions, and each one exists to stop a particular kind of non-content from winning.

  1. Clip to the viewport. Start from the intersection of the element with the viewport, round width and height up to integers and multiply. Anything below the fold or clipped doesn't count. For text, the rectangle is the union of the border boxes of the element's owned text nodes, intersected with the visual viewport, so padding, margins and borders never count.
  2. Discard full-viewport content. If the size equals the root document's visual viewport area (excluding scrollbars), the element is not a candidate. Chrome has done this for images since Chrome 88, on the grounds that full-viewport images are visually equivalent to background images, and its current code tests "greater than or equal" rather than "equal".
  3. Discard low-content images. If the image response's content length in bytes is less than size × 0.004, it's not a candidate. The spec's note says this targets backgrounds, gradients and placeholders that encode many pixels in very few bytes.
  4. Count only the image, not the element. Compute the image's concrete object size inside the element, adjust for object-position and the content box, apply transforms, and intersect that with the clipped rectangle. Letterboxing from object-fit: contain and the element's own decorations drop out.
  5. Penalize upscaling. Divide the area of the image's whole rendered rectangle (before clipping) by its natural area. If that scale factor is greater than 1, divide the size by it.

The upscaling step has a neat consequence. For an image that's fully visible and stretched, dividing by the scale factor gives back exactly the natural area. web.dev states the same rule as "either the visible size or the intrinsic size, whichever is smaller". When the stretched image is partly clipped, the division scales the visible part down in proportion. You can't make a 320 by 180 thumbnail win by stretching it over the page.

Fig. 2 runs one image through those reductions.

Here's the spec's calculation for an <img> as a function you can paste into a console. It skips transforms and object-position, and assumes object-fit: fill with no padding or border, so the image fills the element's box.

effective-visual-size.js
function intersect(a, b) {
  const x = Math.max(a.x, b.x);
  const y = Math.max(a.y, b.y);
  const right = Math.min(a.x + a.width, b.x + b.width);
  const bottom = Math.min(a.y + a.height, b.y + b.height);
  return { width: Math.max(0, right - x), height: Math.max(0, bottom - y) };
}

// LCP ED section 4.3, simplified: object-fit: fill, no transforms.
function effectiveImageSize(img, bytes) {
  const box = img.getBoundingClientRect();
  const viewport = {
    x: 0,
    y: 0,
    width: document.documentElement.clientWidth,
    height: document.documentElement.clientHeight,
  };
  const visible = intersect(box, viewport);
  let size = Math.ceil(visible.width) * Math.ceil(visible.height);
  // Full-viewport content counts as background.
  if (size === viewport.width * viewport.height) return null;
  // Low-content image, at the spec's threshold.
  if (bytes < size * 0.004) return null;
  const naturalArea = img.naturalWidth * img.naturalHeight;
  if (naturalArea === 0) return null;
  const scaleFactor = (box.width * box.height) / naturalArea;
  if (scaleFactor > 1) size /= scaleFactor; // upscaling penalty
  return size;
}

To call it you need the response size. Resource Timing gives you that for a same-origin or CORS-enabled image, and reports zero for a CORS-cross-origin one:

const hero = document.querySelector('img');
const [timing] = performance.getEntriesByName(hero.currentSrc);
effectiveImageSize(hero, timing.encodedBodySize);

On my test pages in Chrome 155, a 1200 by 675 JPEG displayed at 960 by 540 reported a size of 518,400, which is the displayed area, because it's downscaled. A 320 by 180 JPEG in the same box reported 57,600, the natural area. Pasting the two blocks above into those pages returned the same two numbers. On the cross-origin page without CORS the function returns null, because the byte count reads as zero; the browser itself has the real length and reported 518,400.

Chrome's low-content threshold is not the spec's

The 0.004 bytes-per-pixel rule has a Chrome number attached that doesn't match it. The Chrome 112 changelog entry, which introduced the filter in April 2023, describes the threshold as "0.05 bits of image data per displayed pixel". That's 0.00625 bytes per pixel. The spec's 0.004 bytes is 0.032 bits. Chromium's source agrees with its changelog: kMinimumEntropyForLCP is 0.05, computed as content size times 8 divided by size, next to a TODO (crbug 534835237) that says the constant "differs from the spec, which uses 0.032 in the equivalent formulation".

So Chrome's bar is about 56% higher than the spec's. An image with between 0.004 and 0.00625 bytes per displayed pixel is a candidate in the spec and filtered out in Chrome. For a 960 by 540 hero, that's a file somewhere between 2,074 and 3,240 bytes: a flat placeholder or an extremely compressed image, not a photo. It matters most for blur-up placeholders. If you swap a tiny placeholder for the real image, the placeholder probably isn't LCP in Chrome even when the spec says it would be.

The order differs too. The spec runs the byte test on the clipped size, before the upscaling penalty. Chromium's ComputeEffectiveVisualSize divides by the scale factor first and computes bits per pixel from the reduced size, so for an upscaled image Chrome's test is more lenient than the raw constants suggest.

The same source file has one more difference. Under a feature flag named kLcpEntropyGatedOnCors, enabled by default on main, Chromium skips the entropy check for images that aren't CORS-same-origin, "to prevent cross-origin size leaks" (crbug 502288792). My test didn't show that in Chrome 155. A 2,610-byte flat grey PNG displayed at 1120 by 630, of which 669,760 pixels were inside the viewport, was filtered out in all 20 runs whether it came from the page's origin, from another origin without CORS, or from another origin with crossorigin="anonymous". The heading stayed LCP every time. That file is under both thresholds (2,679 bytes for the spec, 4,186 for Chrome), so the test says nothing about which constant Chrome uses. It does say the CORS gating wasn't active for that image in Chrome 155.

The search stops at the first scroll or input, but which ones count differs

Report largest contentful paint's first real step is a return: "If either of window's has dispatched scroll event or has dispatched input event is true, return." Once either flag is set, no more entries are produced, ever, for that document.

The two flags come from different places. Has dispatched scroll event is defined in the LCP draft's modifications to the DOM specification: it's set when a scroll event with isTrusted true is dispatched at any target whose global is the window. Has dispatched input event belongs to the Event Timing draft (dated 13 October 2026), which sets it at the same moment it queues the first-input entry: when the first event with a non-zero interactionId gets its duration, that is, after that interaction's next paint. Pointer hovers and a pointerdown that turns into a scroll have no interaction ID, so they don't set it. A tap or a key press does.

The spec is honest about what this costs. Its limitations section says the algorithm "will not capture the main content if the user input occurs before the main content is displayed", and that it "may produce meaningless results or no results at all if user input occurs very early". The cookie-banner tap from the opening is exactly this: the user's first tap lands before the hero arrives, the heading is the last candidate, and LCP comes out fast for a page that wasn't.

Chrome has adjusted where input counts. Chrome 83 started counting inputs and scrolls in subframes, and reported a drop of about 5% at p75 and about 40% at p99 for sites with frames, on Android only. Chrome 88 made input in an out-of-process iframe stop the main frame's LCP, which affects only CrUX, since the API doesn't report iframe content to the parent.

Programmatic scroll doesn't stop Chrome

The spec's scroll flag cares only about a trusted scroll event, and the scroll event the browser fires after a script calls window.scrollTo() is trusted. So I tested it. A page scrolls itself by one pixel at 800 ms, then swaps in a larger slide at 1,500 ms. In Chrome 155 a trusted scroll event fired at about 807 ms in every one of five verification runs, and the larger slide still produced an LCP entry in all 20 measurement runs, at a median of 1,836 ms. A real click at 800 ms on the same carousel stopped the search: the larger slide produced no entry in any of 20 runs.

So in Chrome, a programmatic scroll doesn't end the search, even though the spec text says any trusted scroll event does. The web-vitals library (6.2.3, published 5 October 2026) seems to have run into the same thing from the other side. It finalizes LCP on trusted keydown, click and visibilitychange, and its source comment says scrolling "is unreliable since it can be programmatically generated", so it doesn't listen for scroll at all.

Background tabs, prerenders, bfcache restores and SPA routes are handled outside the API

The spec measures document loads and says so. Its limitations section lists two cases where LCP is not reset: back/forward cache restorations, and same-document navigations in single-page apps. It also warns that pages loaded off-screen (background tabs, prerendering) "will report larger values than may be expected", since they measure from navigation until a paint that couldn't happen while the page was hidden.

The metric deals with these outside the API, and web.dev lists the differences between the metric and the API. Google's tools don't report LCP for pages loaded in the background, and entries emitted after a page was hidden should be ignored. For prerendered pages, LCP should be measured from activationStart instead of navigation start. Bfcache restores get no entries from the API at all, but should be measured, since users experience them as separate visits. The web-vitals source shows one way to do all three: it drops entries rendered after the page was first hidden, subtracts activationStart, and measures a restore as the time from the pageshow event to a double requestAnimationFrame callback.

Single-page apps are a separate story. Chrome 151 added soft-navigation and interaction-contentful-paint entries, and web-vitals' onLCP uses them when you pass reportSoftNavs. PRF-06 covers that. For the hard-navigation LCP this piece is about, a client-side route change is more paints after the search has usually already stopped.

renderTime is a presentation timestamp, loadTime is not a paint at all

An LCP entry carries four timestamps, and they mean different things.

  • loadTime is the pending image record's load time: when the image became completely available, not when it painted. For text it's 0.
  • paintTime comes from the PaintTimingMixin: the end of the rendering update in which the content painted.
  • presentationTime is the "implementation-defined presentation time", when the frame was shown. It can be null.
  • renderTime returns the default paint timestamp: the presentation time if there is one, otherwise the rendering update end time. startTime returns renderTime.

So renderTime and startTime always agree in the current spec, and neither is 0. The web-vitals source still carries a comment saying startTime returns renderTime "if it is not 0, and the value of the loadTime otherwise". That describes the old cross-origin behaviour, which the next section covers.

paintTime and presentationTime arrived in Chrome 145 (stable 10 February 2026), which the changelog records as shipping PaintTimingMixin across entry types. MDN's browser-compat data lists paintTime in Chrome 145, Firefox 140 and Safari 26.2. It also lists presentationTime in the same three, but marks Firefox and Safari as partial, with the note "This property is exposed, but always returns null".

That last detail matters for cross-browser comparison. In Chrome, renderTime is the presentation time. In Firefox and Safari, per BCD, presentationTime is always null, so by the spec's definition their renderTime is the end of the rendering update, a point earlier in the pipeline than presentation. Two engines can't be compared by subtracting their numbers, then, even before you get to how differently they schedule rendering. I haven't measured the size of that gap. LCP has been Baseline newly available since 12 December 2025, when Safari 26.2 shipped it (webstatus.dev, as of 18 October 2026; the Safari 26.2 release notes list it alongside Event Timing). Baseline says the entry exists everywhere, not that it means the same thing everywhere. PRF-05 is about exactly that.

Logging all four is safe in any engine that has LCP: a property the browser doesn't implement reads as undefined. MDN's example branches on presentationTime and paintTime before using them; for a diagnostic table, logging them raw is enough:

lcp-timestamps.js
new PerformanceObserver((list) => {
  const entry = list.getEntries().at(-1); // latest candidate
  console.table({
    element: entry.element?.tagName ?? '(null: removed or in shadow DOM)',
    url: entry.url,
    size: entry.size,
    loadTime: entry.loadTime, // image completely available; 0 for text
    paintTime: entry.paintTime, // undefined before Chrome 145
    presentationTime: entry.presentationTime, // null in Firefox, Safari
    renderTime: entry.renderTime, // presentation time if known
    startTime: entry.startTime, // equals renderTime
    crossOriginIsolated: self.crossOriginIsolated,
  });
}).observe({ type: 'largest-contentful-paint', buffered: true });

On my same-origin hero page in Chrome 155, the gap from paintTime to presentationTime for the final image entry had a median of about 16 ms over 20 runs, and the gap from loadTime to renderTime about the same. That's headless Chrome on an idle page with nothing else on the main thread, so read it as a floor, not a typical value.

The cross-origin problem moved from TAO to cross-origin isolation

For years, a cross-origin image without a Timing-Allow-Origin header got a renderTime of 0. startTime fell back to loadTime, so LCP reported when the bytes arrived rather than when they painted. web.dev's CrUX and RUM guide describes the strangest result: RUM could report LCP earlier than FCP, which can't happen on screen. CrUX was never affected, because Chrome reports render time to CrUX internally.

I reproduced the old behaviour with the Chromium 101 build I had locally. A hero from another origin without TAO had renderTime 0 in 20 of 20 runs, and startTime equal to loadTime, at a median of 306 ms. With Timing-Allow-Origin: * the same image reported a median renderTime of 317 ms, about 11 ms later than its load time. On an idle test page the difference is small. On a page where a long task sits between the image arriving and the next frame, it's the whole of the render delay, invisible to RUM.

The TAO check went away in November 2024

The spec change came from an observation that the check didn't protect anything. In w3c/paint-timing#104, Noam Rosenthal wrote in October 2024 that the TAO restriction doesn't make sense because "that's a resource-based protection and render time is for the whole document". A page could already learn a cross-origin image's render time by painting a same-origin image in the same frame. His proposal was to remove the TAO restriction and coarsen render time by 4 ms when the document isn't cross-origin isolated. Pull request #105, "Remove TAO check from element timing & LCP reporting", merged on 4 November 2024.

The rule that replaced it is in mark paint timing today, and it doesn't mention the image at all. If the document's "cross-origin isolated capability is false", the presentation time is coarsened "to the next multiple of 4 milliseconds, or coarser", and the flush waits until that coarsened time. Neither the LCP draft nor the Paint Timing draft fetched on 18 October 2026 contains the string "Timing-Allow-Origin". TAO itself is still defined, in §3.5.2 of Resource Timing (Editor's Draft, 1 September 2026), and it still unlocks the detailed Resource Timing attributes for that resource. It just no longer gates LCP. Not every reference has caught up: MDN's renderTime description, read on 18 October 2026, still reads "May be a coarsened value if the element is a cross-origin image loaded without the Timing-Allow-Origin header", while the spec coarsens every presentation time in a document that isn't cross-origin isolated.

Chrome shipped this in Chrome 133, stable on 4 February 2025 per Chromium Dash. The Chrome 133 changelog says that presentation timestamps, including renderTime, "are instead just coarsened to a 4ms multiple", that the launch was the week of 27 February 2025, and that RUM users "may notice an increased LCP time" that is "more an improvement to measurements" than a regression. The Chrome Platform Status entry states the motivation in the same terms as the spec: coarsen all render times by 4 ms "when the document is not cross-origin-isolated". Its compat section estimates the coarsening moves LCP and FCP by about 2 ms on average.

In Chrome 155, TAO changes nothing and isolation removes the 4 ms grid

The part that surprises people is that coarsening applies to every entry in a non-isolated document, including same-origin images and text. My measurements, 20 runs per variant:

Page (Chrome 155, headless) Final LCP, median [range] renderTime a multiple of 4 ms
Same-origin hero 324 ms [316..344] 40 of 40 entries
Cross-origin hero, no TAO 324 ms [316..336] 40 of 40
Cross-origin hero, Timing-Allow-Origin: * 324 ms [316..348] 40 of 40
Cross-origin hero, page cross-origin isolated 353 ms [343.9..369.5] 0 of 40

TAO made no difference to anything I could observe in Chrome 155: same renderTime, same median, same coarsening. Cross-origin isolation (COOP same-origin plus COEP require-corp) removed the 4 ms grid entirely, which is what the spec says. I wouldn't read the isolated page's higher median as a cost of isolation. It's one page, one machine, and the isolated variant may well pay for a separate process.

web.dev still says to set Timing-Allow-Origin when you can, "particular for browsers that don't include this recent change". That's reasonable advice for older Chrome versions, where the zero still applies. I found no source saying whether Firefox or Safari ever gated LCP's renderTime on TAO, so I can't say whether the advice still matters for them.

First frames and opacity decide when content counts as painted

For animated images and video, "rendered" has to mean a particular frame. web.dev's list of eligible elements says animated images such as GIFs use the first frame's presentation time, and videos use the poster image's load time or the first frame's presentation time, whichever is earlier. Paint Timing's contentful definition covers a <video> that "represents its poster frame or the first video frame".

That's newer than it looks. The Chrome 116 entry (August 2023) is where videos without posters became candidates at all, and where animated images stopped waiting until they were fully loaded. At the time, it said the change only affected UKM and CrUX, not PerformanceObserver. The Chrome 151 entry (stable 28 July 2026 per Chromium Dash1) fixed the web-exposed side. Chrome now requests a frame as soon as the first video frame's timing arrives, so the entry isn't delayed on an idle page. The same entry warns that because video renders off the main thread, the reported LCP is "typically 1 vsync interval larger" than when the video actually rendered. Chrome 153 (stable 8 September 2026) fixes race conditions in presentation timestamps for animated images and first video frames.

Embedded video players show how CrUX and RUM part ways. The CrUX guide's iframes section uses an autoplaying <video> inside a streaming service's <iframe> as its example: CrUX can see the first frame and count it, and page JavaScript can't. The guide says this holds even for same-origin iframes, as far as the parent page's APIs go.

An opacity-0 page can't have an LCP until the opacity lifts

The opacity rules make "fade the page in once it's ready" a direct LCP cost. My test page puts opacity: 0 on the root element and switches it to 1 at 1,000 ms, while the hero finishes loading at about 307 ms. In Chrome 155, LCP was the hero at a median of 1,012 ms in all 20 runs, and FCP moved to the same moment. Only one LCP entry was emitted per run: the heading and the hero became paintable in the same frame, and the algorithm picks one candidate per frame, the largest. The spec has required one candidate per paint since pull request #154, merged in February 2026 to fix issue #135.

I only tested a step change. With a CSS transition, my reading of the paintable rule is that the first frame with non-zero opacity counts, which is the first frame of the transition rather than its end. Either way, LCP can't happen before your script decides the page is ready.

The demos show which entries fire, not field timings

All the measurements above come from one harness. The method matters more than the numbers, so here it is.

  • Setup. Node 24 serving two origins on one machine: the pages on 127.0.0.1 and the images on localhost, on different ports, so the images are cross-origin and cross-site. Every image response was held for a fixed 300 ms so that text paints first. Every page has a heading and a paragraph, then the variant's content.
  • Browser. Chrome 155.0.8059.80 with --headless=new, window 1280 by 800, on a 2021 MacBook Pro (M1 Max) running macOS 27. For the pre-change comparison, Chromium 101.0.4929.0, also headless. I drove both over the DevTools protocol, with a fresh tab per run, and dispatched the click through Input.dispatchMouseEvent, which produces trusted events.
  • Runs. 20 per variant. Each page logs every LCP entry and FCP into a global, read back after 3 seconds. Medians and ranges are over the final LCP entry per run. Every timestamp is in milliseconds from the navigation's time origin, as the API reports it.

Fig. 3 lays the carousel results side by side: the same page with and without a click at 800 ms.

Variant (Chrome 155) Entries per run Final LCP element Final LCP, median [range]
Carousel: larger slide swapped in at 1,500 ms 3 larger slide 1,836 ms [1,824..1,860]
Same carousel, click at 800 ms 2 first slide 324 ms [320..340]
Same carousel, scrollTo(0, 1) at 800 ms 3 larger slide 1,836 ms [1,820..2,380]
Splash image removed at 1,200 ms, smaller main image added 2 removed splash 324 ms [320..340]
Full-viewport object-fit: cover image 1 heading 28 ms [20..48]
Image inside an open shadow root 2 null 324 ms [320..348]
Root opacity 0 until 1,000 ms 1 hero 1,012 ms [1,008..1,012]

The splash row is the one to show anyone building a loading screen. The splash covered 669,760 pixels of viewport and was removed at 1,200 ms; the 800 by 450 main image that replaced it never produced an entry. LCP reported 324 ms for a page whose real content arrived after 1.5 seconds.

These are lab numbers from one machine with no network shaping and no main-thread contention. They show which entries the algorithm emits and why, and the timestamps are only as realistic as an idle headless browser. I haven't published the harness yet; until I do, the bullet list above is enough to rebuild it in an afternoon.

Fix which element wins before you chase the timestamp

Treat element and url as the real output, and the timestamp as the second. Many surprising LCP values come from the wrong element winning, and the entry tells you which one won. Log the element (with a fallback to url for shadow DOM and removed nodes), its size and its loadTime next to renderTime. The gap between loadTime and renderTime is render delay, and it's the cheapest diagnostic you'll get.

Make sure your splash or skeleton is smaller than your hero. If a loading screen is the largest thing to paint before the real content, it is your LCP, and removing it won't change that. Either make it smaller than the hero, or make it non-contentful (a CSS gradient, or something under the low-content threshold in Chrome, which per the source is 0.05 bits per displayed pixel).

Don't fade the page in. An opacity: 0 root or wrapper moves FCP and LCP to whenever your script lifts it. If you need anti-flicker for experiments, scope it to the element that changes, and measure what it costs.

Keep the hero at natural size or larger, inside the first viewport. Upscaled images are divided by their scale factor, and anything outside the viewport doesn't count. An image that slides in from off-screen may never be a candidate.

If you serve the hero from another origin, you don't need TAO for LCP in current Chrome, but send it anyway. Since Chrome 133 the render time is exposed regardless; TAO costs one header, still helps older Chrome and still unlocks the detailed Resource Timing fields for that image. If you need sub-4 ms precision, the requirement is cross-origin isolation, not TAO.

If LCP can live in an iframe, have the iframe report it. The page's API can't see subframe paints, and CrUX can. web.dev's list of API differences says subframes can use the API and report their entries to the parent, and web-vitals doesn't cover this case. A minimal version inside a frame you control:

frame-lcp.js
// Runs inside the iframe. PARENT_ORIGIN is the embedding page's origin.
const PARENT_ORIGIN = 'https://www.example.com';

new PerformanceObserver((list) => {
  const entry = list.getEntries().at(-1);
  parent.postMessage(
    {
      type: 'frame-lcp',
      // The frame has its own time origin; send it so the parent can convert.
      timeOrigin: performance.timeOrigin,
      renderTime: entry.renderTime,
      size: entry.size,
      url: entry.url,
    },
    PARENT_ORIGIN,
  );
}).observe({ type: 'largest-contentful-paint', buffered: true });

The parent checks the sender before trusting the message, then moves the timestamp onto its own timeline:

parent-lcp.js
// Runs in the embedding page. FRAME_ORIGIN is the iframe's origin.
const FRAME_ORIGIN = 'https://player.example.com';

addEventListener('message', (event) => {
  if (event.origin !== FRAME_ORIGIN) return;
  if (event.data?.type !== 'frame-lcp') return;
  const { timeOrigin, renderTime, size, url } = event.data;
  const pageTime = timeOrigin + renderTime - performance.timeOrigin;
  console.log({ pageTime, size, url });
});

What the parent does next, how a frame's "largest" compares with its own, is a design decision, not a spec rule, and CrUX's exact approach isn't documented.

Record the Chrome version next to every LCP beacon. The changelog lists ten entries from Chrome 130 to Chrome 153, and two of them (Chrome 133's coarsening, and the Chrome 140 text timestamp bug that made some text LCPs look a vsync faster until Chrome 143) moved RUM values with nobody shipping anything. Without the version you can't tell those from your own regressions.

What we don't know

Whether Chrome implements the 3-pixel rule. PR #160 points to a Chromium test CL, but the candidate comparison I read in largest_contentful_paint_calculator.cc on main is a plain "effective size larger than" check, with no width or height delta. The rule may live in a file I didn't read. A WPT result for the minimal-change test, or a changelog entry, would settle it.

When Chromium's CORS gating for the entropy check ships. The source on main skips the low-content filter for non-CORS images behind a default-on flag, and Chrome 155 still filtered my no-CORS flat image. That fits a change that landed after Chrome 155 branched on 14 September 2026 (per Chromium Dash), or one held back by a field trial, and I can't tell which: the gitiles history page requires a sign-in, so I couldn't date the commit or map it to a milestone. A changelog entry or a Chrome Platform Status feature would answer it, and so would rerunning the flat-image test on Canary.

Whether the spec and Chrome will converge on the low-content threshold. The spec says 0.004 bytes per pixel, Chrome uses 0.05 bits (0.00625 bytes), and Chrome's own TODO acknowledges the gap. I also didn't check what Firefox or Safari use, or how either threshold treats formats like AVIF that compress flat regions extremely well. WPT tests at both values would show who implements which.

What a programmatic scroll should do. The spec's scroll flag is set by any trusted scroll event at a target whose global is the window. In my Chrome 155 runs, a scroll caused by window.scrollTo() fired a trusted event and didn't stop LCP. I don't know whether Chrome filters to user-initiated scrolls on purpose (web-vitals' comment suggests the team considers programmatic scrolls noise) or whether the spec's wording is meant to be read that way. I didn't test Firefox or Safari.

What shadow DOM content should do. Issue #152 is open. Chrome counts shadow-tree paints and hides the element; WebKit tried and reverted the same; the spec's root checks read as excluding them. Until that's resolved, an LCP that lives in a web component's shadow root may count in one engine and not in another.

Whether the 4 ms coarsening is the same on high-refresh displays, and whether it differs between engines. The spec says "the next multiple of 4 milliseconds, or coarser", which lets an engine coarsen more. I only measured Chrome on one machine, headless, where presentation timing may not match a real display. I found no source on what Firefox and Safari do, which matters less while their presentationTime is null but would matter once they implement it.

How CrUX combines frame LCPs with the main frame's. CrUX measures LCP inside iframes, and the CrUX guide says so, but I found no documentation of the rule it applies: largest across all frames by effective size, by main-frame viewport area, or something else. That rule decides what a RUM pipeline has to replicate.

Notes

  1. The Chromium changelog files give different months: the Chrome 147 entry says it "reached stable users in February 2026" and the Chrome 151 entry says June 2026. Chromium Dash lists stable dates of 7 April and 28 July 2026. I use Chromium Dash: the changelog months match the files' names (2026_02_lcp.md, 2026_06_lcp.md), which look like the dates the entries were written rather than release dates. ↩︎ ↩︎

References

  1. Largest Contentful Paint - Editor's Draft, 26 August 2026. W3C Web Performance WG. Accessed .
  2. Largest Contentful Paint - W3C Working Draft, 26 August 2026. W3C. Accessed .
  3. Paint Timing - Editor's Draft, 14 October 2026. W3C Web Performance WG. Accessed .
  4. Event Timing API - Editor's Draft, 13 October 2026. W3C Web Performance WG. Accessed .
  5. Resource Timing - Editor's Draft, 1 September 2026. W3C Web Performance WG. Accessed .
  6. HTML Standard - Event loop processing model. WHATWG. Accessed .
  7. Largest Contentful Paint (LCP). web.dev (Google). Accessed .
  8. Why is CrUX data different from my RUM data?. web.dev (Google). Accessed .
  9. Largest Contentful Paint Changelog. Chromium. Accessed .
  10. Largest Contentful Paint Changes in M83. Chromium. Accessed .
  11. Largest Contentful Paint Changes in M86. Chromium. Accessed .
  12. Largest Contentful Paint Bug Fixes in M88. Chromium. Accessed .
  13. Largest Contentful Paint Definition Change in M88. Chromium. Accessed .
  14. Largest Contentful Paint change in Chrome 112 to ignore low-entropy images. Chromium. Accessed .
  15. Largest Contentful Paint change in Chrome 116 to better handle animated content. Chromium. Accessed .
  16. Largest Contentful Paint Change in Chrome 130. Chromium. Accessed .
  17. Largest Contentful Paint Changes in Chrome 133. Chromium. Accessed .
  18. Largest Contentful Paint bug in Chrome 140. Chromium. Accessed .
  19. Largest Contentful Paint Changes in Chrome 147. Chromium. Accessed .
  20. Largest Contentful Paint Changes in Chrome 151. Chromium. Accessed .
  21. largest_contentful_paint_calculator.cc (main branch). Chromium. Accessed .
  22. Expose coarsened cross-origin renderTime in element timing/LCP (regardless of TAO). Chrome Platform Status. Accessed .
  23. Chromium Dash release schedule. Chromium. Accessed .
  24. Remove TAO check from element timing & LCP reporting (w3c/paint-timing#105). W3C Web Performance WG (GitHub). Accessed .
  25. Consider to expose decoding time for FCP and LCP? (w3c/paint-timing#104). W3C Web Performance WG (GitHub). Accessed .
  26. Fix #135: report one candidate per paint (w3c/largest-contentful-paint#154). W3C Web Performance WG (GitHub). Accessed .
  27. Add minimal change threshold (w3c/largest-contentful-paint#160). W3C Web Performance WG (GitHub). Accessed .
  28. Non-human visible size changes should not impact LCP (w3c/largest-contentful-paint#158). W3C Web Performance WG (GitHub). Accessed .
  29. What is the behavior when paints emit from inside the Shadow DOM? (w3c/largest-contentful-paint#152). W3C Web Performance WG (GitHub). Accessed .
  30. LargestContentfulPaint. MDN. Accessed .
  31. browser-compat-data: api/LargestContentfulPaint.json. MDN (GitHub). Accessed .
  32. Largest contentful paint (LCP) performance entries - feature status. Web Platform Status (webstatus.dev). Accessed .
  33. Chrome 151 release notes: PerformanceSoftNavigation and InteractionContentfulPaint performance entries. Chrome for Developers (Google). Accessed .
  34. WebKit Features for Safari 26.2. WebKit. Accessed .
  35. web-vitals: src/onLCP.ts (v6.2.3). GoogleChrome (GitHub). Accessed .

Found this useful? Pass it on.

Set in Archivo on a twelve-column grid. Built with Lit web components and rendered to static HTML.

© 2026 Oleg Chursin
Brooklyn, New York