[LCP] Add Recommendation to use the same domain as the root/site one for LCP Images in order to reduce LCP timing
Serving LCP Images from non Root Site domain implies significant additional latency for sites and this may impact the likehood to meet the LCP threshold in the Lab and Field.
I believe Developers would find useful to see this opportunity exposed among the other audits exposed for LCP Images optimization.
It would be extremely useful!
This is definitely a situation Lighthouse should highlight more prominently. Possibly a new audit, or it might make more sense to broaden uses-rel-preconnect to suggest bringing everything onto the same origin, and only if that's not possible suggest preconnecting.
Hi brendankenny! Is there an update in this issue? Thanks!
it might make more sense to broaden uses-rel-preconnect to suggest bringing everything onto the same origin, and only if that's not possible suggest preconnecting.
The obvious alternative to moving everything to the root origin is.... static assets are served on a static.somedomain.com host PLUS a preconnect. (Even better, advertise the preconnect in either the Link response header or Early Hints).
From a developer effort/difficulty POV, moving the image host under the same origin is likely pretty challenging for large hosts. (All the ones I know keep all static assets on a separate hostname). (Admittedly adopting early hints is not easy either).
All that to say, I think I'd favor a more aggressive preconnect audit than this origin-consolidation recommendation.
From a purely webperf POV, I think using this "obvious alternative" is arguably as good or better than a 1-origin setup. CDNs got plenty of benefits beyond just latency. And the time for the extra TCP connection should be mitigated by the preconnect (especially if its an early hint or link header)