Linux 软件免费装
Banner图

Smart LazyLoad – Lazy Load Images, Videos and Iframes

开发者 jumedeenkhan
mozedia
更新时间 2026年8月2日 22:04
捐献地址: 去捐款
PHP版本: 7.2 及以上
WordPress版本: 7.0.2
版权: GPLv2 or later
版权网址: 版权信息

标签

performance lazyload lazy load lazy loading lazy load images

下载

1.3.4 1.5 2.0.0 2.9.0 1.4.0 1.4.1 1.4.2

详情介绍:

The best free, simple & lightweight lazy load plugin for WordPress. Lazy loading images, videos, and iframes to improve page speed performance and Core Web Vitals scores. Most lazy load plugins only optimize images. Smart LazyLoad goes further by deferring images, responsive <picture> sources, background images, native HTML5 videos, and iframes (including YouTube, vimeo) until they are about to enter the viewport. Built with a lightweight, dependency-free frontend engine, Smart LazyLoad uses modern browser APIs without requiring jQuery or other third-party libraries. It also includes native browser lazy loading support, smooth loading effects, and intelligent defaults, so it works well immediately after activation. Unlike most lazy load plugins, Smart LazyLoad gives you two levels of control. A global Master Switch lets you enable or disable lazy loading across your entire website, while a per-post override allows individual posts and pages to follow the global setting or force lazy loading on or off when needed. Everything is managed from a clean, modern settings page where you can choose what to lazy load, fine-tune performance, customize placeholders and animations, and exclude specific elements for maximum compatibility.

安装:

From your WordPress dashboard
  1. Navigate to Plugins → Add New Plugin
  2. Search for Smart LazyLoad
  3. Click Install Now, then Activate
  4. Go to Settings → LazyLoad to review the defaults — lazy loading for images is already on out of the box
Manual upload
  1. Download the plugin's ZIP file
  2. Upload the lazy-load-for-images folder to /wp-content/plugins/
  3. Activate the plugin from Plugins → Installed Plugins
  4. Visit Settings → LazyLoad to adjust anything, or leave the defaults as they are
No further setup is required — lazy loading starts working on the frontend as soon as the plugin is active.

屏幕截图:

  • Main settings to enable lazy loading and choose what to optimize.
  • Performance settings for Core Web Vitals and loading behavior.
  • Appearance settings for placeholders, colors, and fade-in effects.
  • Advanced settings for exclusions and compatibility options.
  • Per-post override settings in the WordPress editor.

升级注意事项:

2.9.0 Broader theme compatibility: images and picture sources now lazy-load correctly no matter how their HTML is formatted or spaced. 2.8.0 Adds automatic AMP compatibility: lazy loading (and its scripts/styles) is now skipped entirely on AMP pages, since AMP's strict markup validation does not allow the custom classes, data attributes, or inline scripts lazy loading relies on. 2.7.0 Fixes a bug where content already inside a script or noscript block (e.g. a manually authored fallback, or an image-like string inside a JS snippet) could be corrupted by lazy loading. Also adds a src-pattern exclusion list so known dynamic image generators and placeholder assets are never lazy-loaded. 2.6.0 Adds retina/responsive background image support (CSS image-set()) and a WP-CLI command to pre-generate LQIP placeholders for your whole media library. Also fixes a hardcoded, non-translatable string on the YouTube thumbnail play button. 2.5.0 The YouTube click-to-play thumbnail's play button now uses a bundled local icon instead of loading it from YouTube's servers on every page view. 2.4.1 Adds a per-post "Lazy Load" override panel (Default/Enable/Disable) to the editor sidebar, and locks the settings page's other options while the Master Switch is off without resetting them. Also fixes a bug where saving settings for the very first time could re-enable every option, plus a minor admin performance fix. 2.4.0 Fixes background images that never finished fading in, <picture> elements lazy-loaded inconsistently, and a JavaScript error on some pages. Settings page redesigned. 2.3.0 Removes the old inline CSS/JS loading mode and adds an option to load the script in the footer. If you had inline mode enabled, switch to the default external asset loading after updating. 2.2.0 Adds <picture> element support and a low-quality image placeholder option. 2.1.0 Adds native <video> lazy loading, fade duration control, placeholder color, custom exclude selectors, and a Reset to Defaults action.

常见问题:

What exactly does Smart LazyLoad defer?

Images inside post/page content, featured images, widget images, avatars, <picture> sources, CSS/inline background images, iframes (YouTube, Vimeo, and others), and native <video> elements. Each content type has its own on/off toggle, so you decide what applies.

How is this different from a plugin that only lazy loads images?

Most lazy load plugins stop at <img> tags. Smart LazyLoad also handles background images, <picture> responsive sources, videos, and iframes, and adds a second layer of control on top of the usual site-wide switch: a per-post override that lets a single page behave differently from the rest of the site.

Does this work with AMP pages?

Yes, safely: on any page served through the AMP plugin, Smart LazyLoad detects the AMP endpoint and skips lazy loading entirely — including its scripts and styles — since AMP's markup rules don't allow the attributes lazy loading needs. Non-AMP pages are unaffected.

How do I make one specific post behave differently from the rest of the site?

Open that post or page in the editor and find the Smart LazyLoad panel in the sidebar. Set the Lazy Load dropdown to Enable to force lazy loading on for that post only, or Disable to force it off — either way, every other post keeps following the site-wide Master Switch untouched.

If I turn the Master Switch off, do I lose my other settings?

No. Every other option on the settings page is dimmed and can't be edited while the Master Switch is off, but its saved value is untouched. Turn the Master Switch back on and your previous configuration is exactly as you left it.

How do I exclude one image, video, or iframe from being lazy loaded?

Add any of these to the element: no-lazyload, skip-lazy, data-no-lazy, or data-skip-lazy. For your own classes or attributes, list them (comma-separated) under Settings → LazyLoad → Custom Exclude Selectors — no code needed.

Can I disable lazy loading with code instead of the settings page?

Yes. add_filter( 'do_smart_lazyload', '__return_false' ); Or conditionally, for example only on single posts: add_action( 'wp', function () { if ( is_single() ) { add_filter( 'do_smart_lazyload', '__return_false' ); } } );

Does it support background images?

Yes, in two ways. Automatically, for any element using the inline style attribute: ` ` Or manually, using the plugin's own markup convention: ` `

Does it support responsive <picture> markup?

Yes. Every <source> inside a <picture> element has its srcset/sizes deferred in sync with the fallback <img>. The browser still decides which source to use based on format and viewport — Smart LazyLoad only changes when the chosen source loads.

What is the low-quality image placeholder (LQIP)?

When turned on, Smart LazyLoad shows a tiny, blurred version of the real image (generated from a registered thumbnail size) instead of an empty box while the full image loads. It's generated once per image, cached, and reused on every later page view. Choose the source size under Settings → LazyLoad → Placeholder Source Size. On a large, existing media library, the first visitor to view each image pays a small one-time generation cost. Avoid that entirely by pre-generating every placeholder in advance from the command line: wp smart-lazyload generate-lqip Add --force to regenerate placeholders that are already cached (useful after changing the Placeholder Source Size).

Can I use my own placeholder image instead of the built-in SVG?

Yes. add_filter( 'smart_lazyload_svg_placeholder', function () { return 'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1 1"></svg>'; } ); Deferred iframes use a separate placeholder (default about:blank), which you can change with: add_filter( 'smart_lazyload_placeholder', function () { return 'about:blank'; } );

Will this conflict with my caching, CDN, or other performance plugins?

No. Smart LazyLoad only changes the HTML markup for images, videos, and iframes on the fly; it doesn't touch how pages are cached or served, so it works alongside typical caching and CDN setups.

Is Smart LazyLoad SEO-friendly?

Yes. Deferred content is always wrapped with a working <noscript> fallback, native browser lazy loading is supported directly, and the first image on the page is skipped by default so it doesn't hurt your Largest Contentful Paint score.

Lazy loading doesn't seem to be working. What should I check?

  • Confirm the Master Switch is on, and that the specific post isn't set to Disable in its Lazy Load panel
  • Clear any page cache, CDN cache, or browser cache
  • Check whether "Disable for Logged-in Users" is on and you're viewing the page while logged in
  • Temporarily disable other lazy load plugins to rule out a conflict
  • Make sure the element doesn't carry one of the exclusion classes/attributes
  • View the actual frontend page, not a page-builder editing screen or preview

更新日志:

2.9.0 2.8.0 2.7.0 2.6.0 2.5.0 2.4.1 2.4.0 2.3.0 2.2.0 2.1.0 2.0.2 2.0.1 2.0.0 1.5 1.4.x 1.0.0