1. Home
  2. Blog
  3. Performance

Fix WordPress Layout Shift With Three Lightify CLS Settings

Performance

October 6, 2026

You go to tap a link, the page jumps, and you hit an ad or the wrong button instead. Everyone has had it happen, and everyone remembers the site it happened on. Google measures it too. The metric is Cumulative Layout Shift (CLS), and it records how much visible content moves around while a page loads.

The frustrating thing about CLS is that the page can be fast and still score badly. A site can deliver its HTML quickly, paint early, and then shove everything down by 300 pixels when an image finally reports its size. Speed settings alone will not help with that.

This guide is about the settings in Lightify, the DaftPlug performance plugin, that exist to fix WordPress layout shift: Properly Size Images, Prevent Layout Shifts, and Lazy Render Elements. Each one targets a different cause, each has a trade-off, and one of them can quietly break anchor links if you turn it on without testing. We will go through all three, in the order you should try them.

How Lightify measures CLS

Before changing anything, know what you are measuring. Lightify’s Core Web Vitals dashboard scores your site from real visitor measurements rather than a single simulated run. The documentation for measuring performance gives CLS these thresholds and weight:

  • Good: under 0.1
  • Poor: over 0.25
  • Weight in the score: 25 percent, the same as LCP

That 25 percent matters. CLS is a quarter of the score, and it is often the cheapest quarter to recover, because the main cause is usually one setting.

The docs also explain why Lightify’s number can disagree with PageSpeed Insights. PageSpeed runs one lab test on a simulated device. Lightify reports what your actual visitors experienced. For layout shift that difference is real: a cookie banner or a late ad might never appear in a lab run, but your visitors see it every time.

Cause one: images without reserved space

The most common cause of layout shift on WordPress is simple. An image loads without the browser knowing how much room it needs. The browser lays out the text, the image arrives, and everything below it moves.

Lightify’s troubleshooting guide says it directly: when content jumps around while loading, turn on Properly Size Images, which fixes the usual cause.

What the setting does

Properly Size Images lives in Lightify > Settings > Media Optimizations. According to the docs, it makes images load at correct dimensions so the browser reserves the right space and content does not jump as they arrive. It directly improves CLS.

Two details make this an easy first step:

  • It is on by default. If you installed Lightify and never touched the Media tab, it is already working.
  • It is in the free version. The Lightify free vs Pro table lists Properly Size Images in the free column.

So the first job is not to turn it on but to confirm nobody turned it off. Open Media Optimizations and check.

What it cannot fix

The same Media Optimizations page includes a piece of advice that applies here: optimization cannot fix a 3000px image shown in a 600px slot. It will be smaller, but it is still the wrong image. Upload at a sensible size. Properly sized dimensions stop the jump, while sensible uploads stop the waste.

Watch the hero image too

The same tab lazy-loads images by default. Lightify automatically excludes the first couple of images so your hero is not delayed, and the count is adjustable with the lightify_lazy_load_above_fold_count filter. That is mainly an LCP concern, covered in depth in our guide to lazy loading images and preloading the hero for LCP. It is worth a look while you are here, because a page builder hero that slips past the exclusion can arrive late and also nudge the layout.

Cause two: the page reveals itself in pieces

Once images have their space reserved, the remaining shifts usually come from the page rendering before it is finished: styles arriving after the HTML, a header that rearranges itself, a flash of unstyled content that snaps into place.

For that, the docs point to Prevent Layout Shifts, which “addresses the rest”.

What the setting does

Prevent Layout Shifts lives in Lightify > Settings > Asset Optimizations, under HTML optimizations. It is off by default and available in the free version. The documentation describes it precisely: it keeps the page hidden until it is fully parsed, then reveals it at once. That removes the flash of unstyled content and the layout shifts it causes.

The trade-off you must test

This is the setting people misunderstand most, so here is the exact wording from the docs: this trades LCP for CLS. Nothing is visible until the page is ready, so the largest paint happens later, but it happens in its final position. Whether it helps depends on your theme.

In practice that gives you three possible outcomes:

  1. CLS improves a lot, LCP barely moves. Keep it. Your theme was shifting during load, and hiding the page for a moment cost almost nothing.
  2. CLS improves, LCP gets noticeably worse. Now you are choosing between two metrics worth 25 percent each. Compare the overall score before and after on real visitor data, not one lab run.
  3. CLS barely changes. Your shifts come from somewhere else, such as late images, ads, or banners. Turn it back off, since you are paying an LCP cost for nothing.

The only way to know which one you have is to measure. Turn it on, purge the cache, give the dashboard time to collect real visits, and compare.

Why the Asset tab needs care

The Asset Optimizations page opens with a warning that applies to everything on it: this tab holds the settings most likely to make a large difference and most likely to break something. Enable them one at a time, purge, and test. Prevent Layout Shifts is low drama compared with Remove Unused CSS or Delay JavaScript, but the rule still holds. If you switch on three settings at once and something changes, you will not know which one did it.

Cause three: too much rendering on first paint

The third setting is different. It is not about things moving. It is about how much work the browser does before it can show anything, which matters most on long pages with lots of blocks.

What Lazy Render Elements does

Lazy Render Elements is a Pro setting in Asset Optimizations, off by default. The docs describe it as skipping the rendering of blocks and elements until they are needed, reducing the work the browser does on first paint.

To keep this from causing its own shifts, Lightify reserves placeholder space for elements it skips. The hooks reference lists the filters that control it:

FilterDefaultControls
lightify_lazy_render_skip_count3Elements at the top rendered normally
lightify_lazy_render_limit30Maximum elements lazy rendered per page
lightify_lazy_render_exclude_keywordsarrayElements never lazy rendered
lightify_lazy_render_intrinsic_height$height, $tag, $attrsThe placeholder height reserved for an element

The anchor link problem

Here is the catch, and the docs flag it in three separate places. An element that has not rendered cannot be scrolled to, so in-page navigation is the usual casualty. If your table of contents, “jump to recipe” button, or FAQ links suddenly scroll to the wrong place, Lazy Render Elements is the first suspect.

The troubleshooting guide gives two fixes:

  • Raise lightify_lazy_render_skip_count, so more elements at the top of the page render normally.
  • Add the container to the exclude keywords, using lightify_lazy_render_exclude_keywords, so the section your anchors point at is never lazy rendered.

The hooks reference adds one more tuning note: raise the skip count if content below the fold on a short page flickers in. A placeholder that does not match the real height can also nudge content, which is what the intrinsic height filter is for.

Who should use it

Lazy Render Elements pays off on long pages: big landing pages, long-form guides, product pages with many sections, archive pages with dozens of cards. On a short blog post it does little. If your pages are short, skip it and spend your time on the first two settings.

Causes no setting can fix

Every Lightify page on this topic ends with the same honest warning. Ads, embeds, and cookie banners injected above existing content cause shifts no plugin setting can fix.

If your CLS is still poor after the three settings above, look for:

  • Cookie or consent banners that push the page down instead of overlaying it. Configure them as an overlay or a bottom bar.
  • Ad slots with no fixed height. Give each slot a minimum height that matches the ad size you sell.
  • Embeds that resize after loading, such as social posts or third-party widgets. Wrap them in a container with a fixed aspect ratio.
  • Notification bars or promo strips injected by JavaScript at the top of the page. Render them in the HTML, or reserve their space.

None of these are performance problems in the usual sense. They are layout decisions, and they need to be fixed where they are made.

A test plan that works

Here is the order that gives you a clear answer at each step.

1. Get a baseline

Open the Lightify dashboard and note your CLS and overall score from real visitors. If the site is new to Lightify, wait until it has some data.

2. Confirm Properly Size Images is on

Media Optimizations. It should already be on. If it was off, turn it on, purge, and wait for new data before going further. For many sites this alone moves CLS into the good range.

3. Try Prevent Layout Shifts

Asset Optimizations. Turn it on, purge everything, then wait. Compare both CLS and LCP. Keep it if the overall score improved, turn it off if it did not.

4. Consider Lazy Render Elements on long pages (Pro)

Turn it on, purge, and immediately test every page that uses anchor links: tables of contents, FAQ jump links, “skip to” buttons. Fix any breakage with the skip count or exclude keywords filters rather than turning the feature off, which follows the docs’ general rule: exclude, do not disable.

5. Hunt the leftovers

If CLS is still poor, the cause is almost certainly a banner, ad, or embed. Load the page on a phone and watch what moves.

When something breaks

Lightify’s Asset Optimizations page has a three-step routine for any problem:

  1. Purge everything. Cached pages were built with the old settings.
  2. Identify the feature. Turn off the last one you enabled and purge again.
  3. Exclude, do not disable. Add the specific file or selector to the relevant exclusion list. Losing one element from an optimization is much better than losing the optimization.

Get told when it slips again

Layout shift tends to come back. A new theme update, a new ad network, or a marketing banner can undo your work without anyone noticing. Lightify’s Score Alerts, in Settings > Notifications, email you when your Core Web Vitals score moves between grades (good, average, poor) in either direction, once at least three visitor measurements exist. It is a cheap way to find out the week a regression happens, rather than a month later.

Free and Pro, in one place

  • Free: Properly Size Images, Prevent Layout Shifts, the Core Web Vitals dashboard, and the rest of the core media and asset settings.
  • Pro: Lazy Render Elements, along with features such as Remove Unused CSS, Delay JavaScript, Auto WebP conversion, and Preload Critical Images.

Pro comes with the DaftPlug membership, where one license unlocks Lightify along with Progressify, Generatify, Rankify, and Snapshotify. Plans are on the pricing page.

Quick checklist

  1. Note your real visitor CLS in the Lightify dashboard.
  2. Confirm Properly Size Images is on in Media Optimizations.
  3. Upload images close to the size they display at.
  4. Test Prevent Layout Shifts, and compare CLS and LCP before keeping it.
  5. On long pages, try Lazy Render Elements and test every anchor link.
  6. Tune with the skip count and exclude keywords filters instead of switching off.
  7. Fix banners, ads, and embeds that push content down.
  8. Turn on Score Alerts so a future regression reaches you.

A stable page is one of the few performance wins visitors notice consciously. Nobody thanks you for a 200 millisecond faster paint, but everyone notices when the button they were about to tap stays where it is.