Repository navigation
Preload CSS background images for Header Cover Layout to improve LCP #4700
Description
Impact: 75 · Confidence: 85 · Complexity: 40
Description
Problem
When pages use the Neve Cover Header layout, hero images are applied via inline CSS background-image styles. Browsers cannot discover CSS background images until styles are parsed and render-tree layout completes, leading to delayed loading and poor Largest Contentful Paint (LCP) scores in Core Web Vitals.
Desired Behavior
Neve should automatically emit <link rel="preload" as="image" href="..."> in the <head> (or use high fetchpriority image markup) when a page background/hero image is designated in Cover Header layout, allowing browsers to fetch the hero background image with high priority immediately.
Acceptance Criteria
- When Header Layout is set to Cover with a background image, Neve automatically outputs an image preload link in
<head>for that image URL. - The preload tag is correctly omitted if no background image is set or if Cover layout is disabled.
- PageSpeed Insights / Lighthouse performance reports reflect early image request discovery and improved LCP for Cover header layouts.
Customer Context
Customer deactivated Neve due to poor LCP performance caused by slow hero/header background image loading on their homepage. Support staff confirmed that Neve serves cover images as CSS background images without preloading.
Root Cause Analysis
Neve's Cover Header layout renders hero images as CSS background-image rules rather than native <img> elements or preloaded image assets. Because browsers delay fetching CSS background images until DOM and CSSOM layout render trees are constructed, hero background images trigger poor LCP scores on Core Web Vitals tests. Optimizing how background cover images are preloaded or rendered in the head improves core theme performance without needing major user-facing workflow changes.
Alternative Suggestions
Improve Neve's page cover layout rendering engine to automatically inject <link rel="preload" as="image" href="..."> for featured background images, or render an inline optimized <img> tag with fetchpriority="high" behind cover layout headers.
Source: HelpScout #3517209471
Generated by feature-request-triage workflow (ID: feature-request-triage_6afc2686486403.45049040)
Activity