← Issues index

7. Header/hero layout flip and hero image not server-rendered — Medium (PV)

🛠️ Size hero with CSS aspect-ratio + media queries, remove min-height transition, render hero without WithLazy; review other !isMobile render branches (sidebar, OutOfPageAd).

16 Nov 2026 (DevTools trace, #39): on a mobile PV article the LCP element is a Google ad image at 17.0 s (lab; real users p75 LCP 3.6 s, CLS 0.33), because the article's own hero image is not in the server HTML. Server-rendering the hero with fetchpriority="high" is the main LCP fix.

Code check (16 Nov 2026, tpml upstream/master 70d7bebf): the hero image is client-only because story-templates/story-header/hero-image/index.js:14 wraps it in <WithLazy margin="20px"> (renders nothing on the server; the image appears only after JavaScript runs and an IntersectionObserver fires). No fetchpriority is set anywhere. Fix: render the hero <img> directly on article pages (no WithLazy above the fold) with fetchpriority="high" and explicit width/height.