Website speed and Core Web Vitals are more critical than ever for SEO and user experience. One of the most common issues site owners face is a slow Largest Contentful Paint (LCP) — and often, the culprit is a large hero/banner image above the fold.
In this post, we’ll show you how to fix it with a single line of code — no plugins, no heavy optimization tools, no complex configurations.
What Is LCP?
Largest Contentful Paint (LCP) measures the time it takes for the largest visible element (usually a banner image or main headline) to render in the viewport. Google recommends LCP be under 2.5 seconds for good performance.
When your hero image loads slowly — even if it’s optimized — it can still hurt your LCP if the browser doesn’t know it’s important early on.
⚡ The Simple Fix: Preload the Hero Image
To tell the browser this image is critical, preload it in the <head>
section of your site using this one-liner:
<link rel="preload" as="image" href="https://yourdomain.com/path-to-your-banner.webp" imagesrcset="https://yourdomain.com/path-to-your-banner.webp 1920w" imagesizes="100vw">
Replace the values:
- href: URL of your banner or hero image
- imagesrcset: Optional responsive versions
- imagesizes: Helps browser choose the best version
✅ Why This Works
Adding this preload link tells the browser:
- “Hey, I’ll need this image ASAP!”
- Load it early, even before parsing the DOM
- Boosts the first visual experience of the page
- Lowers LCP time significantly
Example Use Case
If your website uses a hero banner like this:
<img src="https://yourdomain.com/path-to-your-banner.webp" alt="Banner" width="1920" height="650" fetchpriority="high">
Then just add this line in your <head>
section:
<link rel="preload" as="image" href="https://yourdomain.com/path-to-your-banner.webp" imagesrcset="https://yourdomain.com/path-to-your-banner.webp 1920w" imagesizes="100vw">
Done ✅ — No need for plugins or theme edits (unless you want to automate it).
Bonus Tips
- Use
fetchpriority="high"
on your image element - Don’t lazy-load above-the-fold images
- Use compressed formats like
.webp
or.avif
Need Help? We Offer WordPress Speed Optimization Services
If you’d rather not deal with technical tweaks and want a guaranteed improvement in performance, we’ve got your back.
WordPress Speed Optimization by 3 Zero Digital
90+ PageSpeed on Desktop & Mobile
LCP, CLS, FCP, TTFB & TTI Optimization
Cloudflare, CDN, Hosting Tweaks, Cache Setup
️ Built by Security & Performance Experts
Final Thoughts
This simple preload tag can dramatically improve your LCP score and boost overall site performance. If you’re struggling with slow banner loads or bad Core Web Vitals, start with this line of code — it’s lightweight, effective, and browser-native.
Small tweaks make big speed wins. Start with what matters most — your users’ first visual experience.