Fix LCP in Webflow
Webflow makes it easy to build visually impressive sites, but the same design features that make Webflow appealing -- rich interactions, animation-heavy hero sections, and extensive custom code integrations -- can significantly hurt Largest Contentful Paint (LCP). The most common causes in Webflow are hero images set to lazy load by default, above-fold entrance animations that delay element visibility, and third-party analytics and marketing scripts added to the page head. The five fixes in this guide address those causes directly using Webflow's Designer interface, custom attributes, and Site Settings panels -- no code export required.
Expected results
Before
4.5s
LCP (Poor) -- lazy hero image, blocking scripts, above-fold animations
After
1.9s
LCP (Good) -- preloaded WebP hero, deferred scripts, transform-only interactions
Step-by-step fix
Use WebP images with explicit dimensions in Webflow Designer
Webflow automatically converts uploaded images to WebP format and serves them through its Imgix CDN, which handles resizing and format negotiation. However, you still need to set explicit pixel dimensions and the correct loading priority for your hero image in the Designer. Select the hero image element and open the Settings panel. Set the width and height to match your intended display dimensions -- this ensures the browser can reserve the correct space and avoids layout shift. In the Custom Attributes section of the Settings panel, add two attributes: fetchpriority set to high, and loading set to eager. By default, Webflow may apply lazy loading to images that appear low on the initial page, but the hero image almost always needs eager loading regardless of its position in the designer's element tree. Also ensure the image file you upload is appropriately sized -- uploading a 4000px wide image for a 1200px display size wastes bandwidth even with Imgix resizing.
<!-- Webflow Designer: Image Element > Settings > Custom Attributes -->
<!-- Add these two custom attributes to your hero image element: -->
<!-- Attribute 1: -->
<!-- Name: fetchpriority Value: high -->
<!-- Attribute 2: -->
<!-- Name: loading Value: eager -->
<!-- Webflow renders the following HTML output: -->
<img
src="https://uploads-ssl.webflow.com/[site-id]/[image-id]/hero.webp"
width="1200"
height="600"
alt="Hero image"
fetchpriority="high"
loading="eager"
srcset="...480w, ...800w, ...1200w"
sizes="100vw"
class="hero-image"
>
<!-- For the preload link, add this in Site Settings > Custom Code > Head: -->
<link
rel="preload"
as="image"
href="https://uploads-ssl.webflow.com/[site-id]/[image-id]/hero.webp"
fetchpriority="high"
>
Minimize custom code and third-party scripts
Webflow Project Settings has a Custom Code section with three areas: Head Code, Body Start Code, and Body End Code. Any script placed in the Head Code section blocks HTML parsing and delays the browser from reaching the LCP element. A common mistake is pasting Google Analytics, Meta Pixel, Hotjar, and other tracking scripts into the Head Code section because the vendor documentation says to. While some of these tools do provide a small window in which head placement is beneficial for tracking accuracy, the performance cost is significant. Move all analytics and marketing scripts to the Body End Code section (just before