Lazy Loader

0

Lazy loading plugin that supports images, iFrames, video and audio elements and uses the lightweight lazysizes script. With manual modification of the markup it is also possible to lazy

Version
Last updated
Active installations
WordPress Version
Tested up to
PHP Version
pa_languages
Rating
Total ratings
Tags
This plugin is outdated and might not be supported anymore.

Description

Lazy loading plugin that supports images, iFrames, video and audio elements and uses the lightweight lazysizes script. With manual modification of the markup it is also possible to lazy load background images, scripts, and styles.

Lazy loads (without the need of any manually modifications):

  • Images inserted via img or picture in posts, pages, Custom Post Types, Text Widgets, …
  • Post thumbnails.
  • Inline background images.
  • Or all images and other enabled media in the markup (that is not excluded or already has a lazy loading attribute), via the option to process the complete markup.
  • iFrames.*
  • Video elements.*
  • Audio elements.*

* Can be enabled in the plugin options.

The plugin comes with the following options (under Settings › Media › Lazy Loader options):

  • Do not lazy load elements with specific CSS classes (you can use the class skip-lazy by default).
  • Add filters that should be processed by Lazy Loader.
  • Enable lazy loading for iFrames.
  • Include the lazysizes native loading plugin that modifies images and iFrames to use the native lazy loading feature of browsers that already support it.
  • Include the lazysizes unveilhooks plugin that adds support for more elements, for example, video and audio elements.*
  • Enable lazy loading for the poster frame of video elements.
  • Enable lazy loading for audio elements.
  • Enable lazy loading for inline background images.
  • Display a loading spinner.
  • Disable the plugin on specific posts/pages (this shows a checkbox in the edit view of all public post types (except attachments) to disable lazy loading for an entire post).
  • Process the complete markup of the site.
  • A textarea to modify the default lazysizes config values.

* The unveilhooks extension of lazysizes supports more than video and audio elements, but you need to manually modify the markup to use it for:

  • Background images not inserted with inline styles.
  • Scripts.
  • Styles.

The plugin adds a noscript element as fallback for disabled JavaScript.

You can disable lazy loading for elements with specific CSS classes by defining them via the plugin settings (SettingsMediaLazy Loader options). Or use the skip-lazy class or the data-skip-lazy attribute. skip-lazy and data-skip-lazy also work on wrapper elements to exclude the wrapper and its children from being processed.