Performance module Free feature

Lazy load images

Keeps WordPress’s native lazy loading on for images and iframes, and adds loading=”lazy” to iframes itself only when that native loading is off, so the browser defers off-screen media until it is needed.

What it does

Loads what is visible, defers the rest

Lazy load images is a Vectro performance feature that keeps WordPress’s native lazy loading switched on for images and iframes, with a fallback that adds the loading=”lazy” attribute to iframes in post content if that native loading has been switched off, so the browser defers loading off-screen media until the visitor scrolls towards it.

Without lazy loading, a browser requests every image on a page as soon as it parses the markup – including the ones far below the fold that a visitor may never scroll to. On a long page with many images that is a great deal of bandwidth spent before anything useful appears.

For images, WordPress already adds loading=”lazy” to images in your content, and this toggle makes sure nothing switches that off. For iframes, WordPress adds loading=”lazy” in the same way, and the separate Lazy Load iFrames toggle is a fallback: if something has switched WordPress’s own iframe lazy loading off, it adds loading=”lazy” to any iframe in post content that does not already have a loading attribute. The browser then defers those requests until the element approaches the viewport.

Which images stay eager is decided by WordPress, not Vectro. WordPress leaves the first images in your content eager, because the largest visible element is usually one of them and lazy loading it would delay the metric you most want to improve.

Why it matters

Images are almost always the largest thing on the page

On a typical WordPress page, images account for far more transferred bytes than HTML, CSS and JavaScript combined. Loading all of them up front competes for bandwidth with the resources needed to render what the visitor can actually see, which delays first paint on exactly the connections that can least afford it.

Deferring off-screen media frees that bandwidth for above-the-fold content. The saving is largest on mobile connections and on long pages – archives, galleries, long-form posts – which is where slow loading hurts most.

Off-screen media deferred
The browser waits until an image approaches the viewport before requesting it.
WordPress protects the LCP image
WordPress leaves the first content images eager, so Largest Contentful Paint is not delayed.
Native browser behaviour
It uses the built-in loading attribute, so there is no JavaScript library to load or maintain.
Covers iframes too
Embedded players and maps in post content are lazy loaded by WordPress, with the Lazy Load iFrames toggle as a fallback if that is switched off.

How to use it

Enable and check a long page

1
Open the Performance module
Go to Vectro > Performance in wp-admin.
2
Check Lazy Load Images and Lazy Load iFrames
Both are on by default. The first keeps WordPress’s native lazy loading active, and the second adds loading=”lazy” to iframes in post content only if WordPress’s own iframe lazy loading has been switched off.
3
Save Performance Settings and clear your page cache
Cached HTML keeps the old markup until it is regenerated.
4
Test a long, image-heavy page
Open a page with many images and scroll. Images should appear as you approach them rather than all loading at once.
5
Check any slider or gallery
Carousels sometimes measure images on load. If a slider misbehaves, that is where to look first.

Technical detail

How the attribute is applied

For images, Vectro returns true on the WordPress wp_lazy_loading_enabled filter, so the native lazy loading WordPress applies to content images stays on even if something else tries to switch it off. For iframes, WordPress core adds the attribute itself. Vectro’s Lazy Load iFrames filter only steps in when WordPress’s own iframe lazy loading has been switched off, and then adds loading=”lazy” to iframe tags that have no loading attribute already, leaving the rest of the post untouched. Iframes that already specify loading=”eager” or loading=”lazy” are left as they are.

Vectro does not choose which images to skip. WordPress leaves the first content images eager as likely Largest Contentful Paint candidates, which matters because lazily loading the hero image is a well-known way to make a Core Web Vitals score worse rather than better.

Images
WordPress’s own native lazy loading, kept on through the wp_lazy_loading_enabled filter.
Skipped
Decided by WordPress, which leaves the first content images eager.
Respected
Iframes that already have a loading attribute are left as they are.
Mechanism
Native browser lazy loading. No JavaScript library is loaded.
Iframes
Lazy loaded by WordPress. The Lazy Load iFrames toggle adds loading="lazy" only if WordPress’s own iframe lazy loading is switched off.
Watch for
Sliders and carousels that measure image dimensions on load.

Compatibility

Vectro detects these and steps aside

WP Rocket
Vectro stops forcing native image lazy loading on while WP Rocket is active.
LiteSpeed Cache
Vectro stops forcing native image lazy loading on while LiteSpeed Cache is active.
EWWW Image Optimizer
Vectro stops forcing native image lazy loading on while EWWW Image Optimizer is active.
Smush
Vectro stops forcing native image lazy loading on while Smush is active, so Smush keeps sole control.

These deferrals apply to image lazy loading only. Lazy Load iFrames keeps running. You can override any automatic deferral from the Compatibility panel in Vectro’s dashboard if you would rather Vectro handle it.

Questions

Frequently asked

What does lazy loading images do in WordPress?

Lazy loading uses the native loading=”lazy” attribute so the browser defers requesting off-screen images and iframes until the visitor scrolls towards them. In Vectro, images and iframes use WordPress’s own native lazy loading, and the Lazy Load iFrames toggle adds the attribute to iframes in post content if that native loading has been switched off.

Does Vectro lazy load images work with Smush?

If Smush is active, Vectro detects it and stops forcing native image lazy loading on, so Smush handles images instead. Vectro’s Lazy Load iFrames toggle keeps working.

How do I enable lazy loading in Vectro?

Go to Vectro > Performance in wp-admin and check that Lazy Load Images and Lazy Load iFrames are on, then clear your page cache. Test a long image-heavy page afterwards to confirm images load as you scroll towards them.

Is lazy loading images in Vectro free or Pro?

Yes, Lazy loading images is free. It is included in the free Vectro plugin on WordPress.org with no account required.

Does lazy loading hurt Largest Contentful Paint?

It does if the largest visible image is lazy loaded, which delays the moment it appears. WordPress leaves the first content images eager for exactly this reason, and Vectro keeps that native behaviour rather than overriding it.

Related features

Reduce what loads up front

Vectro Pro adds WooCommerce script optimisation to control which assets load on shop pages. See Pro plans

Download Vectro free on WordPress.org

27 features across Security, Performance and Maintenance. No account required, no expiry, unlimited sites.

Scroll to Top