LCP Image on a CDN or Another Domain: The Extra Connection
What a second connection adds to LCP on phones, how to serve your image CDN from your own domain, and what helps when the image cannot move.
- Good ≤ 2.5 s
- Needs improvement ≤ 4 s
- Poor > 4 s
LCP image on another domain in short
A Largest Contentful Paint (LCP) image on another domain or CDN host waits for its own connection before the browser can request it. On my test shop, over a modelled phone network, that second connection made LCP 248 ms slower. Serve the image from the page's own host. When it can't move, start the connection before the HTML arrives.
Why is an LCP image on another domain slower?
An LCP image on another domain is slower because the browser first needs a new connection to that host: a DNS lookup, a TCP handshake and a TLS handshake, and a fresh connection starts slow. On the page's own host, the image goes out right away on the connection that delivered the HTML.
Chrome's preload scanner queues an eager <img> as the HTML streams in. On the page's own host, fetchpriority="high" puts it ahead of lower-priority files on the open HTTP/2 or HTTP/3 connection. On a separate CDN host, it waits for a second connection that starts in TCP slow start and can't be prioritized against the stylesheets and scripts on the main one.
I measured this on an outdoor-gear test shop behind a TCP proxy that models a phone network (150 ms round trip, 1.6 Mbit/s down, 750 kbit/s up, 4x CPU slowdown, Chrome 158.0.8127.36, 15 loads per variant). The page serves an 82 KB WebP hero (800 by 467, fetchpriority="high"), a 7.4 KB gzip stylesheet and a 5.7 KB gzip deferred script after a 200 ms HTML build. Both variants had a 669 ms Time to First Byte and discovered the image at 678 ms. On the page's own host, the request went out at once on the HTML connection (15 of 15 loads) for a 1,312 ms median LCP. On the other domain, 314 ms of connection setup delayed the request to 992 ms (0 of 15 on the page's connection) and pushed LCP to 1,560 ms. Local host mapping skipped DNS, which a real first visit adds.

Own host: requested on the open HTML connection.

Another domain: waits for a new connection first.
Chrome DevTools, one load of each variant.
DevTools network throttling hides this gap. It adds latency per HTTP request and leaves the TCP and TLS handshakes at local speed, which is why I tested through a TCP proxy.
According to the State of Web Vitals, 21.6% of sites (of 161,028) serve their phone LCP image from another host, adding 82 ms to median resource load delay (406 ms against 324 ms). Other-host sites pass LCP slightly more often overall only because React, Next.js and Wix cluster on fast CDNs with a lower TTFB; within individual platforms, own-host sites pass more often. Across CoreDash sites, 40.4% of phone image LCPs come from another host.
How do you see where your LCP image comes from?
Compare the hostname in the LCP image URL with the page's, then check the Domain and Connection ID columns in the Network panel of Chrome DevTools. On a cold load, a Connection ID that differs from the HTML document's means a second connection, shown as Initial connection in the Timing tab.
- DevTools Network panel. In a fresh private window, turn on the
DomainandConnection IDcolumns (right-click a column header) and load the page. Hover the image's waterfall bar or open its Timing tab to see Initial connection (including SSL). - Lighthouse. Lighthouse 13 counts the new connection in Resource load duration in its LCP breakdown. On the test shop, Lighthouse 13.6.0's simulated mobile throttling added 750 ms of LCP for the second domain (1,952 ms against 1,202 ms). Its Network dependency tree insight leaves requests the HTML starts out of Preconnect candidates ("No additional origins are good candidates for preconnecting" on the test shop) and lists an image host only when CSS or JavaScript starts the request. A clean list is no all-clear.
- Field data LCP parts. CoreDash and web-vitals (
resourceLoadDelayandresourceLoadDuration) count the connection in Load Delay when the image host sendsTiming-Allow-Origin(323 ms against 9 ms on the test shop). Without it, browsers maskrequestStartto 0 and the connection moves into Load Time (875 ms against 562 ms; how resource load duration is measured). Cloudinary (res.cloudinary.com), imgix (assets.imgix.net,images.unsplash.com), Wix (static.wixstatic.com), Shopify (cdn.shopify.com) and ImageKit (ik.imagekit.io) sentTiming-Allow-Origin: *in my check;images.pexels.comdid not.

Chrome DevTools on the test shop: the hero has its own Connection ID, and its timing starts with Initial connection.
Is a subdomain like static.example.com another domain too?
A subdomain such as static.example.com is another origin. It gets a new connection, unless it resolves to the same IP address as the page and the page's TLS certificate covers both hostnames. When both match, Chrome reuses the open connection (HTTP/2 connection reuse, or HTTP/3) for a normal <img> without crossorigin, at 0 ms of TCP and TLS setup. The test shop's subdomain matched the own host: 1,312 ms LCP across all 15 loads.
Across CoreDash sites, 21.5% of phone LCP images on another host sit on a subdomain such as static. or img.; a first visit still pays the DNS lookup before the IP can match. Reuse disappears when images.example.com is a CNAME to Cloudinary, imgix, Gumlet or a separate S3 and CloudFront distribution, because the vendor's IP and certificate differ. When www.example.com and cdn.example.com both sit orange-clouded on one Cloudflare zone, resolve to the same IP and share a certificate, Chrome can coalesce them. Check the Connection ID column in DevTools before you rewrite URLs: Lighthouse 13.6.0 still charged the test shop's coalesced subdomain 1,953 ms of simulated LCP.
Most static. and img1. subdomains date from HTTP/1.1's 6-connection limit and its uncompressed cookies. HTTP/2 and HTTP/3 multiplex streams on one connection, and HPACK shrinks an unchanged Cookie header to 1 byte. A separate subdomain breaks stream prioritization and adds a handshake, which is why Wikimedia folded bits.wikimedia.org back onto each wiki domain, and why I advise against separate CDN subdomains when fixing slow hero images.
How do you serve the LCP image from your own domain?
Route your image CDN or storage bucket through a path on the page's own hostname, such as /images/ or /media/, behind your main CDN. Depending on your platform, that is its own image endpoint, a path rule on your CDN, or a reverse proxy at the edge.
| Platform or service | Where the other host comes from | What to change |
|---|---|---|
| Shopify | Hardcoded cdn.shopify.com URLs instead of Shopify's /cdn/shop/ path | Use native theme sections with Liquid image_url and image_tag filters, and drop manual cdn.shopify.com preconnects |
| WordPress: Jetpack Site Accelerator | Site Accelerator rewrites uploads to i0.wp.com through i2.wp.com | Disable Site Accelerator in Jetpack > Settings > Performance (or filter jetpack_photon_skip_image) and optimize the LCP image locally |
| WordPress: WP Offload Media | Uploads rewritten to S3, CloudFront or an uncoalesced cdn. CNAME | Route /wp-content/uploads/* on your main CDN to the bucket, or proxy cdn. on the same Cloudflare zone |
| Cloudflare Images & Polish | Default imagedelivery.net URLs in Cloudflare Images | Serve via /cdn-cgi/imagedelivery/... or /cdn-cgi/image/... on your zone (with Polish, origin uploads already stay on your domain) |
| Amazon S3 & CloudFront | Direct s3.amazonaws.com URLs or a separate CloudFront distribution | Add the S3 bucket (with Origin Access Control) to your main CloudFront distribution and route images/* to it |
| Next.js & Vercel | unoptimized, a plain <img>, or a custom loader bypassing /_next/image | Use the default Next.js Image loader with images.remotePatterns, so heroes come from /_next/image |
| Netlify | External CMS or bucket URLs in <img> | Allowlist the host in netlify.toml remote_images and serve via /.netlify/images |
| Cloudinary & imgix | res.cloudinary.com, *.imgix.net, or custom CNAME subdomains | Reverse-proxy /media/ on your main edge CDN, or route through /_next/image or /cdn-cgi/image/ |
| Contentful, Sanity & Storyblok | images.ctfassets.net, cdn.sanity.io or a.storyblok.com URLs | Route via your framework's image endpoint, or a main-CDN path forwarding query strings and Accept |
| Wix & Squarespace | Fixed platform hosts (static.wixstatic.com, images.squarespace-cdn.com) | Can't move; keep a <link rel="preconnect"> without crossorigin in <head> |
Behind an edge CDN that caches /media/*, nginx can proxy that path to Cloudinary or imgix with TLS SNI on and cookies cleared:
location /media/ {
proxy_ssl_server_name on;
proxy_set_header Host res.cloudinary.com;
proxy_set_header Cookie "";
proxy_pass https://res.cloudinary.com/my-cloud/;
}
In Next.js, allowlist the source host in next.config.js and leave out a custom loader, and the hero comes from /_next/image:
// next.config.js
module.exports = {
images: {
remotePatterns: [
{ protocol: 'https', hostname: 'res.cloudinary.com', pathname: '/my-cloud/**' },
],
},
};
<Image src="https://res.cloudinary.com/my-cloud/image/upload/hero.jpg" alt="..." width={800} height={467} loading="eager" fetchPriority="high" sizes="100vw" />
Three things can break when you proxy an image CDN onto your domain:
Vary: Acceptand format caching. When the image CDN picks AVIF, WebP or JPEG at one URL (f_auto,auto=format,/m/), forwardAccept, put it in the outer CDN's cache key and keepVary: Accept. StrippingAcceptserves JPEG to everyone; leaving it out of the cache key serves cached AVIF to browsers without AVIF support.- Cookies bypassing the edge cache. Main-domain requests send session cookies, so ignore cookies in the
/media/*cache key, stripSet-Cookieon responses and clearCookieupstream. - Proxying without an edge cache. Only proxy
/media/*when an edge CDN caches the responses, withCache-Control: public, max-age=31536000, immutableand the query strings in the key. An uncachedproxy_passsends distant visitors through your origin.
When the image can't move: does a preconnect or 103 Early Hints help?
A <link rel="preconnect"> in the HTML only helps for the time between the browser reading that tag and finding the LCP image. On the test shop it saved 0 ms with the hero near the top of the HTML, and 56 ms behind a 29 KB gzipped menu. The same preconnect in 103 Early Hints starts the handshake while the server is still building the HTML, and brought LCP within 40 ms of the own host.
| Variant on the test shop | LCP (ms) | Against own host | Image found (ms) | Request sent (ms) | New connection wait (ms) |
|---|---|---|---|---|---|
Own host (same) | 1,312 | 678 | 678 | 0 | |
Other domain (other) | 1,560 | +248 ms | 678 | 992 | 314 |
Other + <link rel="preconnect"> | 1,560 | +248 ms | 678 | 992 | 313 |
Other + <link rel="preconnect" crossorigin> | 1,584 | +272 ms | 678 | 1,012 | 334 |
Other + <link rel="preload" as="image" fetchpriority="high"> | 1,564 | +252 ms | 676 | 992 | 314 |
Other + 103 Early Hints preconnect | 1,352 | +40 ms | 678 | 782 | 104 |
29 KB menu, own host (big-same) | 1,392 | 813 | 813 | 0 | |
29 KB menu, other domain (big-other) | 1,696 | +304 ms | 812 | 1,126 | 313 |
29 KB menu, other + <link rel="preconnect"> | 1,640 | +248 ms | 813 | 1,068 | 254 |
29 KB menu, other + 103 Early Hints | 1,396 | +4 ms | 813 | 822 | 9 |
Medians of 15 loads per variant on the test shop.
On the small page, the <head> and the hero <img> arrive in the same chunk, 9 ms after the first byte, so a <link rel="preconnect"> or <link rel="preload"> starts no earlier than the image itself. The 900-link menu (73 KB raw) moved discovery to 67 ms after the 745 ms first byte. A preconnect in the head saves its full handshake only when CSS or JavaScript finds the image late (resource load delay).
When the server takes time to build the HTML and the image can't move, send the preconnect in 103 Early Hints over HTTP/2 or HTTP/3. Chrome, Edge, Firefox and Safari 17+ support rel=preconnect in a 103 (Safari ignores rel=preload there). On the test shop, the 103 arrived at 468 ms, during the HTML build:
HTTP/2 103 Early Hints Link: <https://img.acme-media.test>; rel=preconnect
A normal <img> fetches in credentialed no-cors mode, and <link rel="preconnect" crossorigin>, often copied from a Google Fonts snippet, opens an anonymous connection the image doesn't use. On the test shop LCP was slower than with no preconnect (1,584 against 1,560 ms). For images found late, Lighthouse's Network dependency tree warns "Unused preconnect. Check that the crossorigin attribute is used properly." Add crossorigin only when the <img> itself has it:
<link rel="preconnect" href="https://img.acme-media.test"> <img src="https://img.acme-media.test/hero-800.webp" width="800" height="467" fetchpriority="high" alt="...">
Lighthouse warns when "More than 4 preconnect connections were found". Below that line, every preconnected domain is still one to avoid first by serving the file from your own host. Keep preconnect for critical origins you can't move: extra handshakes compete with your hero image, like preconnecting to ad networks.
How do you check that the fix worked?
In Chrome DevTools, the fix worked when the LCP image has the same Connection ID as the HTML document and its Timing tab shows no Initial connection bar. In real-user monitoring, mobile Load Delay (or Load Time when the old host lacked Timing-Allow-Origin) drops over the next few days on the pages with that image.
Test in a fresh private window, so a warm connection can't hide a leftover CNAME, and check Cache-Control and Vary: Accept on the image response.
How I check this in real-visitor data
In CoreDash, the Real User Monitoring tool I built, I filter mobile LCP by LCP image URL and check Load Delay and Load Time for that image. CoreDash records the full URL on every image LCP view. Its issue "LCP image on another host" opens when at least 25% of the LCP images on a page group come from another host (at least 50 views, p75 LCP over 2.5 s). Once the image comes from your own domain, the other host drops out of new views and Load Delay or Load Time comes down.
Moved the hero image onto your own domain and mobile LCP is still over 2.5 s, or stuck on a platform that can't move it? Bring the page to an hour with me on your slow LCP element. We put your mobile field data next to a trace of the template and find what still holds the image back. Then we settle the exact change for your developer or host.

Need a faster site?
I'm Arjen, and I've been fixing slow sites for 17 years. If you're running into issues you can't fix yourself, send me your URL and let's have a chat.
Send me your URL
Why isn't our fix working?
Sometimes the CDN still serves the old HTML, or the fix went into the desktop template and mobile uses another one. Send me your URL and the problem, and I reply with a few times. I check your field data first, then we spend one hour on your site, and within a day you have my notes in writing. €350 excl. VAT.
Send me your URLNo developer to build the fix? I do the work myself, on a copy of your site.