Cwv cls
Moderate effortFound on 20% of audited stores.
Eliminate unexpected layout shifts by reserving explicit space for every image, video, embed, ad, and late-loading widget before it loads, so nothing on your page jumps around as it renders.
What it is
Cumulative Layout Shift (CLS) measures how much the visible content on your page unexpectedly moves while it is loading. Every time an image pops in and pushes a button out of reach, a font swaps and reflowing text, or a banner ad shoves your product description down the page, that counts as a layout shift. Google's "good" threshold is a CLS score below 0.1; a score of 1.05 — as in the example above — means content is shifting dramatically, which is easily noticeable to shoppers. The most common causes are images and videos without explicit width/height attributes, web fonts that change character sizes when they load, third-party widgets (chat bubbles, review carousels, cookie banners, email pop-ups) injected above existing content, and dynamically inserted banners or promotional bars.
Why it matters
CLS is one of Google's three Core Web Vitals, which are a direct ranking signal in Google Search — a poor score can push you below competitors even if your content is better. Beyond rankings, layout shift is a serious conversion killer: a shopper who taps "Add to Cart" while the page is still loading can accidentally hit the wrong element, leading to frustration and cart abandonment. Google's own research links poor page experience scores to higher bounce rates and lower revenue per session. On mobile devices — where Google indexes first — layout shift is even more pronounced because screens are small and a single banner inserting itself at the top can move everything else off screen.
How to fix it
- Audit your CLS: open Google PageSpeed Insights (pagespeed.web.dev) or run a Chrome Lighthouse report on your most important pages (homepage, collection/category pages, product pages). Expand the 'Avoid large layout shifts' diagnostic to see exactly which elements are causing shifts.
- Fix images and videos: add explicit width and height attributes to every <img> and <video> element in your HTML (or the equivalent settings in your platform's media uploader). This lets the browser reserve the right amount of space before the file downloads. For responsive images, also set aspect-ratio via CSS (e.g. aspect-ratio: 16/9) so the reserved space scales correctly.
- Fix web fonts: add font-display: swap (or font-display: optional for minimal shift) to every @font-face declaration, and if you self-host fonts, preload the primary font file with <link rel='preload' as='font'>. This prevents invisible-text flashes that cause reflow.
- Fix banners, announcements, and promotional bars: never inject content above existing page content after load. Place announcement bars and cookie/GDPR consent banners in a fixed position (CSS position: fixed or sticky) or reserve their exact pixel height in the layout from the start using a placeholder element.
- Fix third-party widgets and ads: for ad slots, set a min-height container matching the largest ad unit before the ad loads. For review widgets, chat buttons, and similar third-party embeds, configure them to load in a pre-sized container or move them below the fold so a late load does not shift above-the-fold content.
- Re-test after each change using PageSpeed Insights or Chrome DevTools > Performance panel, and confirm your CLS score drops below 0.1. Use the Web Vitals Chrome extension for a real-time, field-data view while browsing your store.
<img
src="product-photo.jpg"
alt="Red running shoes"
width="800"
height="800"
style="aspect-ratio: 1/1; width: 100%; height: auto;"
>
/* CSS: reserve space for an ad slot before it loads */
.ad-container {
min-height: 90px; /* match your largest ad unit height */
width: 100%;
}
/* CSS: prevent font-swap layout shift */
@font-face {
font-family: 'MyFont';
src: url('/fonts/myfont.woff2') format('woff2');
font-display: swap;
}Fix it on your platform
Pick your platform for the exact steps.
How to fix cwv cls on Shopify
- Images: In Online Store > Themes > Edit Code, open the Liquid template(s) for your sections (e.g. sections/image-banner.liquid, snippets/product-image.liquid). Find every <img> tag and ensure width='{{ image.width }}' height='{{ image.height }}' attributes are set. Dawn and other modern Shopify themes include these by default — verify yours does too.
- Responsive aspect ratio: In your theme's CSS file (assets/theme.css or base.css), add .media { aspect-ratio: var(--ratio-width) / var(--ratio-height); overflow: hidden; } and make sure image wrappers use this class.
- Announcement bar: In the Theme Customizer (Customize > Announcement Bar section), the bar is rendered server-side and reserves space by default in modern themes. If you added a third-party announcement bar via a Script Tag or app, replace it with a theme section so the height is pre-reserved.
- Fonts: In Online Store > Themes > Edit Code > assets/base.css (or theme.css), find @font-face rules and add font-display: swap;. If using Google Fonts loaded via a <link> tag, add &display=swap to the Google Fonts URL in theme.liquid.
- Third-party widgets and chat: Go to Online Store > Themes > Edit Code > layout/theme.liquid. Move any injected widget <script> tags to just before </body> so they load last and cannot shift above-the-fold content. Wrap each widget's mount point in a min-height container.
- Cookie/consent banners: If using a Shopify app for GDPR consent, check the app's settings for 'banner position' and set it to a bottom-fixed bar. Apps like Pandectes GDPR or Consentmo have this option in their app dashboard.
How to fix cwv cls on Shopify Plus
- All standard Shopify steps above apply. Additionally, use Shopify Scripts or Launchpad to ensure promotional banners and flash-sale bars are pre-rendered in theme sections rather than injected via client-side JavaScript.
- For checkout extensions: in the Shopify Plus Checkout Editor, all blocks are rendered server-side with reserved space — avoid injecting custom checkout content via external scripts that fire after load.
- Use Shopify's CDN image transformations ({{ image | image_url: width: 800 }}) and always pair with width/height attributes in Liquid to prevent CLS on checkout and account pages.
How to fix cwv cls on WooCommerce
- Images: In Appearance > Customize > (theme options) or directly in your theme's template files (e.g. woocommerce/content-single-product.php), ensure every <img> has width and height attributes. WordPress auto-generates these for images added via the Media Library — verify your theme is not stripping them.
- WordPress Core: Navigate to Settings > Media and confirm thumbnail dimensions are set. When regenerating thumbnails (use the 'Regenerate Thumbnails' plugin), WordPress re-writes width/height into the database markup.
- Fonts: In Appearance > Theme File Editor (or via a child theme's style.css), add font-display: swap; to every @font-face rule. If your theme uses Google Fonts, install the 'OMGF | Host Google Fonts Locally' plugin to self-host fonts and apply font-display:swap from its settings panel.
- Third-party plugins (chat, reviews, pop-ups): Go to each plugin's settings and ensure their widgets are positioned fixed/sticky or loaded below the fold. Move any <script> tags these plugins add to the footer using a plugin like 'Asset CleanUp' to defer or move them.
- Page speed plugin: Install a performance plugin such as WP Rocket, LiteSpeed Cache, or NitroPack. In the plugin's settings, enable 'Eliminate render-blocking resources,' 'Defer JavaScript,' and (in WP Rocket) the 'Remove Unused CSS' option — these collectively reduce the late-loading surprises that cause CLS.
- Ads/banners: If you use a banner or slider plugin (e.g. MetaSlider, Slider Revolution), set an explicit height on the slider container in CSS, or use the plugin's built-in 'aspect ratio' option, so the space is reserved before the images load.
How to fix cwv cls on BigCommerce
- Images: In Storefront > My Themes > Edit Theme Files (Stencil), open the relevant template (e.g. templates/components/products/card.html). Find <img> tags and add width and height attributes using the Handlebars image helper: {{getImageManagerUrl image.data '500x500'}} and set the dimensions as attributes.
- CSS aspect ratio: In assets/scss/components/products/_card.scss (or similar), add an aspect-ratio rule to the image container class so it reserves space before the image downloads.
- Fonts: In assets/scss/settings/foundation/base/_settings.scss (or your theme's font file), find @font-face declarations and add font-display: swap;. If loading Google Fonts via a <link> in templates/layout/base.html, append &display=swap to the URL.
- Announcement bars and promotional banners: Use the built-in BigCommerce 'Carousel' or 'Banner Manager' (Marketing > Banners) rather than custom injected scripts, as these are rendered server-side. If using a Script Manager script (Storefront > Script Manager) for a banner, wrap the target div with an explicit min-height in CSS.
- Third-party scripts: In Storefront > Script Manager, for any widget scripts set the 'Load Method' to 'Defer' and 'Location' to 'Footer' to prevent them from blocking layout.
- Cookie banners: In your GDPR/consent app's settings, set the banner to 'bottom fixed' position so it does not push page content.
How to fix cwv cls on Wix
- Images: In the Wix Editor, click any image element > Settings > ensure you have defined both the width and height of the image container. Wix automatically reserves the container's space in its layout engine — the key is not leaving image containers set to 'auto' height.
- Use Wix's built-in Image component rather than HTML embed widgets for product images; the native component handles space reservation automatically.
- Fonts: Wix loads fonts via its own font system. In the Editor, go to Site Design (paint bucket icon) > Text Themes, and stick to Wix-hosted fonts (Wix Fonts or Google Fonts loaded through Wix). Avoid pasting custom @font-face code in Custom CSS unless you add font-display: swap; manually via Settings > Custom Code.
- Promotional/announcement bars: Use a Wix Strip or Box element pinned at the top with a fixed pixel height. Avoid using third-party HTML widgets injected above the main content area, as these can shift the DOM.
- Third-party apps and widgets: In your Wix dashboard, review any installed Wix Apps (e.g. chat, reviews, pop-ups). In the App Market or the app's settings panel, configure widgets to load in a fixed-position overlay or below the fold rather than inline above content.
- Cookie consent: Use a Wix-native cookie consent solution (Settings > Cookie Banner) which is rendered in a fixed bottom position and does not cause layout shift.
How to fix cwv cls on Squarespace
- Images: Squarespace automatically outputs width and height on images rendered through its native Image Blocks and Product Gallery blocks — keep images in these native blocks rather than embedding raw <img> tags in Code Blocks.
- Avoid using Code Blocks to inject images or external embeds above the fold; use native Squarespace content blocks wherever possible.
- Fonts: Go to Design > Fonts and choose from Squarespace's built-in font library. These are loaded with font-display: swap by Squarespace's renderer. If you have added custom fonts via Design > Custom CSS (@font-face), add font-display: swap; to each declaration.
- Announcement bars and banners: Use the native Announcement Bar (Pages > Announcement Bar) rather than injecting a banner via Settings > Advanced > Code Injection. The native bar is pre-sized in the layout.
- Third-party scripts and pop-ups: Scripts added via Settings > Advanced > Code Injection (Header) run early and can cause CLS. Move non-critical scripts to the Footer injection area. Configure any pop-up or chat widget to be position: fixed so it does not displace page content.
- Cookie banners: Use Squarespace's built-in Cookie Banner (Settings > Cookies & Visitor Data) which renders in a fixed position. Third-party cookie scripts injected into the header are a common CLS culprit on Squarespace — switch to the native option.
How to fix cwv cls on Webflow
- Images: In the Webflow Designer, click any Image element > Settings panel (gear icon). Set an explicit Width and Height, or use the Style panel to add an aspect-ratio property (e.g. aspect-ratio: 4/3) to the image's wrapper div. This ensures the browser reserves the right space.
- CMS images: For CMS Collection images (e.g. product photos), select the image in the Collection List and in the Style panel set the image wrapper to a fixed aspect-ratio or percentage-based height. Do not leave image wrappers at height: auto without a defined aspect ratio.
- Fonts: Go to Project Settings > Fonts. Webflow loads Google Fonts and Adobe Fonts automatically with font-display: swap for Google Fonts. For custom uploaded fonts, go to Project Settings > Fonts > Upload Font and ensure font-display is set (add custom CSS in the global stylesheet: @font-face { font-display: swap; }).
- Announcement bars and sticky headers: Build announcement bars as a fixed-height Section at the top. Set an explicit min-height in the Style panel so the space is always reserved, even before any CMS content or dynamic text loads.
- Third-party embeds and scripts: Add non-critical third-party scripts (chat, analytics, reviews) via Project Settings > Custom Code > Footer Code section, not the Head section, so they load after the main content is painted.
- Interactions/animations: In the Webflow Interactions panel, avoid 'Move' or 'Size' entrance animations on above-the-fold elements that trigger on page load — these count as layout shifts. Use opacity-only animations for reveal effects instead.
How to fix cwv cls on Adobe Commerce (Magento)
- Images: In your theme's layout XML and template .phtml files, ensure all <img> tags include width and height attributes. For product images, edit app/design/frontend/<Vendor>/<Theme>/Magento_Catalog/templates/product/view/gallery.phtml and confirm width/height are output from the product image data object.
- Responsive images: Add CSS to your theme's web/css/source/ files: .product-image-container { aspect-ratio: 1/1; } to reserve square image space on product and category pages.
- Fonts: In web/css/source/_typography.less (or .scss), find @font-face declarations and add font-display: swap;. If using Google Fonts, add &display=swap to the URL in your layout XML <head> block.
- Banners and sliders (PageBuilder): If using Page Builder, open the Row or Banner element > Advanced and set a fixed min-height. Avoid 'auto-height' banner rows above the fold.
- Third-party modules: Audit app/design/frontend/<Vendor>/<Theme>/requirejs-config.js and layout XML for any module loading scripts in the <head>. Use the 'defer' or 'async' attribute for non-critical scripts. Move chat and review widget scripts to the footer by setting <move> in layout XML.
- Full Page Cache: In Stores > Configuration > Advanced > System > Full Page Cache, ensure Varnish or the built-in FPC is enabled. Cached pages paint faster and reduce the window in which late-loading elements can cause CLS.
How to fix cwv cls on Klaviyo
- Email/SMS signup pop-ups and flyouts served by Klaviyo are a frequent source of CLS when they insert above or within page content. In your Klaviyo account, go to Sign-Up Forms.
- For each active form, click Edit > select the Display Settings tab. Set 'Display Behavior' to a triggered/delayed display (e.g. 'Show after 5 seconds' or 'Show on exit intent') rather than 'Show immediately on page load' — this ensures the form does not inject before the page is fully painted.
- For flyout/side-tab forms, confirm the form style is set to 'Flyout' or 'Full-Page' (overlay) not 'Embedded' — embedded forms inserted inline above product or blog content push surrounding elements down and cause significant CLS.
- If you use an embedded inline form, wrap the Klaviyo embed code in a container div with a fixed min-height matching the form's pixel height, so the browser reserves the space even before the Klaviyo script fires.
- Save and publish changes, then re-test your CLS on affected pages with Google PageSpeed Insights to confirm the shift caused by the form is eliminated.
Does your site have this issue?
Run a free SEOLZ audit to find cwv cls — and every other issue — across your whole site in minutes.
Scan my site freeFrequently asked questions
What is Cwv cls?
Cumulative Layout Shift (CLS) measures how much the visible content on your page unexpectedly moves while it is loading. Every time an image pops in and pushes a button out of reach, a font swaps and reflowing text, or a banner ad shoves your product description down the page, that counts as a layout shift. Google's "good" threshold is a CLS score below 0.1; a score of 1.05 — as in the example above — means content is shifting dramatically, which is easily noticeable to shoppers. The most common causes are images and videos without explicit width/height attributes, web fonts that change character sizes when they load, third-party widgets (chat bubbles, review carousels, cookie banners, email pop-ups) injected above existing content, and dynamically inserted banners or promotional bars.
Why does cwv cls matter?
CLS is one of Google's three Core Web Vitals, which are a direct ranking signal in Google Search — a poor score can push you below competitors even if your content is better. Beyond rankings, layout shift is a serious conversion killer: a shopper who taps "Add to Cart" while the page is still loading can accidentally hit the wrong element, leading to frustration and cart abandonment. Google's own research links poor page experience scores to higher bounce rates and lower revenue per session. On mobile devices — where Google indexes first — layout shift is even more pronounced because screens are small and a single banner inserting itself at the top can move everything else off screen.
How do I fix cwv cls?
Eliminate unexpected layout shifts by reserving explicit space for every image, video, embed, ad, and late-loading widget before it loads, so nothing on your page jumps around as it renders.
Authoritative references
- Page experience & Core Web Vitals — Google Search Central
- Core Web Vitals — web.dev
- Mobile-first indexing — Google Search Central