| 开发者 |
jumedeenkhan
mozedia |
|---|---|
| 更新时间 | 2026年1月29日 20:26 |
| 捐献地址: | 去捐款 |
| PHP版本: | 7.2 及以上 |
| WordPress版本: | 6.9 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
/wp-content/plugins/Yes. It supports lazy loading for:
Add one of the following attributes or classes to the element:
no-lazyloadskip-lazydata-no-lazydata-skip-lazymozedia_lazyload_excluded_attributesmozedia_lazyload_iframe_excluded_patternsYes. Use the following filter:
add_filter( 'do_mozedia_lazyload', '__return_false' );
Or conditionally disable it:
add_action( 'wp', 'disable_mozedia_lazyload' ); function disable_mozedia_lazyload() { if ( is_single() ) { add_filter( 'do_mozedia_lazyload', '__return_false' ); } }
Yes. It works well with most caching, CDN, and optimization plugins.
Yes. Smart LazyLoad preserves original content using noscript fallbacks, supports native lazy loading, and allows skipping the first image for better LCP performance.
Yes. Smart LazyLoad can automatically lazy-load background images defined via the style attribute, such as: ` ` You can also apply it manually yourself. Simply add this special markup to the element on which you want to apply lazy loading: ` `
Yes. Change the SVG placeholder using this filter:
add_filter( 'mozedia_svg_placeholder', 'mozedia_replace_image_placeholder'); function mozedia_replace_image_placeholder() { return 'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1 1"></svg>'; }
Lazy loaded iframes use a separate placeholder value (default: about:blank).
You can customize the iframe placeholder using the following filter:
add_filter( 'mozedia_lazyload_placeholder', function () { return 'about:blank'; });
If Smart LazyLoad plugin is not working as expected, please check the following: