
Lazy Load WordPress images. Load images only after scrolling down and when viewport and improve page speed.
Smart LazyLoad is the best free lazy load plugin for WordPress to lazy load images, videos, and iframes when they are about to enter the viewport.
Instead of loading every resource at once, the browser only requests what a visitor can actually see, so pages open faster, use less bandwidth, and render with less layout shift.
This LazyLoad plugin processes the entire rendered page at once, including post/page content, comments, widgets, thumbnails, avatars, and media associated with smilies.
No jQuery or other third-party libraries and the script size is less than 10KB.
What does Lazy Loaded?
- Images – Standard images, responsive images, and media inside
<picture> and <source> elements.
- Videos – HTML5 video elements, including video sources and poster images.
- Iframes – Embedded content such as YouTube and Vimeo, with optional click-to-play YouTube thumbnails.
- Background Images – Inline CSS backgrounds,
data-bg attributes, retina images, multiple background layers, and image-set() variants.
Main Features
Three Loading Engines
Choose the loading engine that best fits your website.
- Smart – Uses the plugin’s JavaScript engine and provides access to the full range of loading controls.
- Hybrid – Combines native browser lazy loading with JavaScript fallback for supported and unsupported media.
- Native – Relies entirely on the browser’s built-in lazy loading without loading the frontend JavaScript library.
Background images, offscreen load cancellation, and loading effects require Smart or Hybrid mode.
Lightweight and Dependency-Free
Built on vanilla-lazyload, the JavaScript engine requires no jQuery dependency.
The lightweight script is under 10KB and loads only when required by your selected engine and enabled content types.
Skip Important Image (LCP)
Prevent important above-the-fold images from being lazy loaded.
- Exclude the first image, first two images, or a custom number of images.
- Optionally apply
fetchpriority="high" to important images.
- Respect existing
loading="eager" and fetchpriority="high" attributes.
This helps ensure that important images load without unnecessary delays and supports better Largest Contentful Paint (LCP).
Reduced Layout Shift
Images without explicit width and height attributes can cause unexpected layout shifts while loading.
Smart LazyLoad automatically fills in missing image dimensions from the image source, helping browsers reserve the required space before the image loads.
Advanced Loading Controls
Fine-tune how media is loaded with options for:
- Custom viewport loading threshold.
- Custom scroll containers.
- Offscreen loading cancellation.
- Restoring original image sources when loading fails.
- Footer script loading & Print compatibility.
Placeholders and Loading Animation
Improve the loading experience with optional visual effects.
- Low-Quality Image Placeholders (LQIP).
- Custom placeholder background colors.
- Smooth image fade-in effects.
- Loading spinner with reduced-motion support.
Page Type & Custom Exclusions
Control exactly where lazy loading is applied.
- Exclude elements by CSS class or ID.
- Exclude media using source URLs.
- Exclude front page, archives, and search results.
- Disable lazy loading for logged-in users.
- Disable lazy loading on mobile devices (small screens).
- Exclude elements using the
skip-lazy class or data-skip-lazy attribute.
Per-Post Lazy Loading Control
Override the global lazy loading settings for individual posts, pages, and custom post types.
Enable or disable lazy loading directly from the editor without changing your website-wide configuration.
Compatibility with Other Plugins and Builders
Smart LazyLoad includes compatibility controls to help prevent conflicts with other optimization tools.
- Automatically skips page-builder editor previews.
- Skips AMP pages by default.
- Disables WordPress core lazy loading.
- Optionally disables Jetpack lazy loading.
These options help avoid multiple lazy loading systems processing the same media.
Dynamic Content Support
Automatically process media added after the initial page load, including AJAX-loaded content and infinite scroll elements.
No-JavaScript Fallback (Noscript)
When JavaScript is disabled, deferred media is not lost. Processed images, iframes, and videos carry <noscript> fallbacks, and lazy-loaded backgrounds use fallback CSS, so content stays visible without scripting.
Developer Friendly
Every filter uses the smart_lazyload_ prefix, so code can control processing, thresholds, placeholders, exclusions, and final markup with a few lines.
Setting the DONOTLAZYLOAD constant turns lazy loading off for a whole request, and WP-CLI commands generate or clear LQIP previews from the command line.
Performance
Smart LazyLoad helps improve perceived page loading performance through several optimizations:
- Defers offscreen media until it approaches the viewport.
- Prevents important above-the-fold images from being unnecessarily delayed.
- Respects existing eager-loading and high-priority image hints.
- Adds missing image dimensions to help reduce layout shifts.
- Uses a lightweight JavaScript engine that loads only when needed.
These optimizations can contribute to improvements in Core Web Vitals, particularly Largest Contentful Paint (LCP) and Cumulative Layout Shift (CLS).
Smart LazyLoad focuses on when media loads. It does not compress, resize, or optimize the actual image files, and it cannot guarantee a particular PageSpeed score.
For the best results, combine it with image optimization, caching, and reliable hosting as part of a broader WordPress performance strategy.
Screenshots

Smart LazyLoad settings menu in the WordPress dashboard.

General settings for lazy loading and exclusions.

Content-type settings for images, videos, iframes, and background images.

Performance settings for important images and loading behavior & controls.

Placeholder settings for Placeholder and loading animation settings.

Advanced settings for compatibility, export/import, and reset settings.

Per-post smart lazyload overrides controls in the post/page editor.
FAQ
Which loading engine should I use?
Start with Smart to get the full set of loading controls, including background images and loading effects. Choose Hybrid to let the browser handle supported images and iframes and use JavaScript for the rest. Choose Native for simple, browser-managed loading without the frontend library.
Background images load only in Smart and Hybrid modes.
How can I use native lazy loading?
Set the engine to Native under Settings → General. Native mode uses the browser’s built-in loading="lazy" attribute, so the JavaScript library is not loaded.
To force native loading for every request regardless of the setting, use:
add_filter( 'smart_lazyload_use_native_lazyload', '__return_true' );
How can I disable lazy loading on specific pages?
Use the page-type exclusions under Settings → General to skip the front page, blog index, archives, or search results. For a single post or page, use the Smart LazyLoad panel in the editor (Default / Enable / Disable).
Developers can also turn processing off for any request with the smart_lazyload_enabled or do_smart_lazyload filters.
For example, to skip only the search results page:
add_filter( 'smart_lazyload_enabled', 'disable_smart_lazyload_on_search' );
function disable_smart_lazyload_on_search( $enabled ) {
if ( is_search() ) {
return false;
}
return $enabled;
}
How can I change the threshold that triggers loading?
Under Settings → Performance, set the Loading Threshold to the distance in pixels before the viewport at which media starts loading.
The smart_lazyload_threshold filter can supply the value from code:
add_filter( 'smart_lazyload_threshold', 'set_smart_lazyload_threshold' );
function set_smart_lazyload_threshold() {
return 500;
}
How can I exclude YouTube videos from lazy load?
Turn off YouTube Thumbnails under Settings → Content to keep video embeds as normal iframes, or disable Iframes to leave all embeds untouched.
The smart_lazyload_exclude_youtube_thumbnail filter takes an array of substrings: any embed whose markup contains one is kept as a normal iframe instead of getting a thumbnail. To keep one specific video as a player, add a substring to that array:
add_filter( 'smart_lazyload_exclude_youtube_thumbnail', 'smart_keep_video_as_iframe' );
function smart_keep_video_as_iframe( $patterns ) {
$patterns[] = 'youtube.com/watch?v=VIDEO_ID';
return $patterns;
}
The smart_lazyload_excluded_src filter skips any iframe by source URL substring. To leave a whole set of embeds untouched:
add_filter( 'smart_lazyload_excluded_src', 'smart_skip_embeds_by_url' );
function smart_skip_embeds_by_url( $patterns ) {
$patterns[] = 'youtube.com/embed/CHANNEL_ID';
return $patterns;
}
How can I lazy load a background image?
Enable Background Images under Settings → Content (and Background Variants if you use retina or image-set() markup). Backgrounds need Smart or Hybrid mode.
For manual markup, set a URL on an element and the plugin handles it:
<div class="smart-lazy-bg" data-bg="photo.jpg"></div>
The smart_lazyload_bg_images_regex filter changes which background-image expressions are matched.
To turn background-image lazy loading off entirely, use:
add_filter( 'smart_lazyload_background_images', '__return_false' );
How can I keep the first (LCP) images from being delayed?
Under Settings → Performance, enable Protect Important Images and choose the first image, first two images, or a custom count. These stay eager so the likely Largest Contentful Paint image loads immediately. Existing loading="eager" and fetchpriority="high" hints are respected too.
How can I change the image placeholder for lazy-loaded images?
Under Settings → Placeholder, choose no placeholder, a low-quality image preview (LQIP), or a placeholder color, plus fade-in and spinner options.
The smart_lazyload_svg_placeholder filter replaces the default transparent SVG, and smart_lazyload_placeholder changes the placeholder used for iframes. To drop the placeholder so the image stays blank until it loads:
add_filter( 'smart_lazyload_dont_use_placeholder', '__return_true' );
How can I remove the noscript fallback?
Add the filter add_filter( 'smart_lazyload_noscript', '__return_false' );. The <noscript> tag is what keeps deferred images visible when JavaScript is disabled, so only remove it when you are sure you don’t need that fallback.
How can I change the HTML output before it is sent to the browser?
Use the smart_lazyload_html filter to adjust the buffered HTML after all lazy-load passes have run:
How can I prevent a specific image from being lazy loaded?
There are several ways to exclude individual images:
- Add
loading="eager" or fetchpriority="high" to the image.
- Add the
skip-lazy, or no-lazyload CSS class in image.
- Add the
data-skip-lazy, data-no-lazy, or data-no-lazyload attribute.
You can also exclude elements by CSS class, ID, or source URL under General → Exclusions, or use the important-image protection in Performance.
Is Smart LazyLoad compatible with caching plugins and CDNs?
Yes. Smart LazyLoad processes the rendered frontend HTML without modifying your original media files.
It works with most caching plugins and CDN configurations. After changing settings, clear your website cache and CDN cache so the updated settings take effect.
Does Smart LazyLoad work with page builders?
Yes. It processes the rendered frontend page, including content generated by page builders and theme templates. Page-builder editor previews are excluded automatically, and AMP pages are skipped by default.
Will my content remain visible if JavaScript is disabled?
Yes. Processed images, iframes, and videos include <noscript> fallbacks, and backgrounds use fallback CSS. Native mode relies on the browser’s built-in behavior.
Can I disable WordPress or Jetpack lazy loading?
Yes. The Advanced tab has options to disable WordPress core lazy loading and Jetpack lazy loading so two systems never process the same media.
Are settings removed when I uninstall the plugin?
Not by default. Enable Advanced → Delete Data on Uninstall to remove settings, per-post overrides, and stored previews when the plugin is deleted. Deactivation never removes your settings.
Can I customize Smart LazyLoad using code?
Yes. Smart LazyLoad provides 18 developer filters covering processing, placeholders, thresholds, exclusions, markup, and media types:
do_smart_lazyload, smart_lazyload_enabled, smart_lazyload_threshold
smart_lazyload_use_native_lazyload, smart_lazyload_background_images
smart_lazyload_excluded_attachments, smart_lazyload_excluded_attributes, smart_lazyload_excluded_src, smart_lazyload_iframe_excluded_patterns
smart_lazyload_placeholder, smart_lazyload_svg_placeholder, smart_lazyload_dont_use_placeholder
smart_lazyload_noscript, smart_lazyload_html
smart_lazyload_youtube_resolution, smart_lazyload_exclude_youtube_thumbnail, smart_lazyload_youtube_html, smart_lazyload_iframe_html
smart_lazyload_bg_images_regex
The plugin also provides WP-CLI commands for generating and clearing LQIP previews.
ChangeLog
3.2.0
- Switched to whole-page response processing; removed per-fragment toggles.
- Extended important-image protection across the entire page.
- Added automatic injection of missing image dimensions.
- Added import/export functionality and print compatibility.
- Improved defaults and made LQIP generation opt-in.
- Standardized settings and option names with the
smart_lazyload_ prefix.
- Added automatic migration of existing settings.
- Added a light/dark theme mode toggle to the settings page.
3.1.0
- Added loading spinner and Smart, Hybrid, and Native engines.
- Added important-image protection and priority controls.
- Added page-type and URL-based exclusions.
- Added per-post Enable/Disable controls.
- Improved page-builder and AMP compatibility.
- Added WordPress core and Jetpack lazy loading compatibility options.
- Added Delete Data on Uninstall option.
- Added reduced-motion support for the loading spinner.
3.0.0
- Added WebP YouTube thumbnails.
- Added script deferral and standardized developer filters.
- Fixed excluded media, broken images, responsive images, and picture element edge cases.
2.9.5
- Fixed native iframe loading and first-image selection.
- Fixed smilies appearing in feeds.
2.9.4
- Added avatar support.
- Improved full-page processing for theme templates.
2.9.3
- Fixed iframe and YouTube detection.
- Improved page-builder detection.
- Added smiley support.
2.9.0
- Improved image and picture element detection.
2.8.0
- Added automatic AMP exclusions.
2.7.0
- Improved script and noscript content protection.
- Added exclusions for known placeholders.
2.6.0
- Added retina background image support.
- Added WP-CLI image preview generation command.
2.5.0
- Added a local YouTube play icon.
- Added a dedicated background image CSS class.
2.4.1
- Added per-post Enable/Disable controls.
2.4.0
- Fixed JavaScript errors and picture element loading.
- Redesigned the settings page.
2.3.0
- Fixed CSS class names and settings persistence.
- Added the footer script loading option.
2.2.0
- Added picture element support.
- Added low-quality image placeholders.
2.1.0
- Added video support.
- Added fade effects and placeholder colors.
- Added exclusions and reset functionality.
2.0.2
- Fixed viewport threshold reset on settings save.
2.0.1
- Improved uninstall cleanup.
- Verified compatibility with WordPress 7.0.2 and PHP 8.
2.0.0
- Rebuilt the plugin setting UI design.
- Added support for videos, iframes, background images.
- Added YouTube thumbnail previews click to play button.