How to fix cwv cls on WooCommerce

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.

Steps for WooCommerce

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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.
Official WooCommerce documentation ↗
<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;
}

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.

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.

See the complete Cwv cls guide for every platform and the full background.

Not sure if your WooCommerce store has this?

Run a free SEOLZ audit — we’ll find cwv cls and every other issue across your whole site.

Scan my site free

Fix cwv cls on another platform