Deze plugin is niet getest met de laatste 3 grotere versies van WordPress. Mogelijk wordt het niet meer onderhouden of ondersteund. Ook kunnen er compatibiliteitsproblemen ontstaan wanneer het wordt gebruikt met recentere versies van WordPress.

Native Image Lazy Loading

Beschrijving

This plugin adds the loading attribute to IMG tags found when filtering the_content() to support native image lazy loading.

For more information about lazy loading images using this new native browser image attribute, check out this article: https://addyosmani.com/blog/lazy-loading/ and for a little more depth into what we’re doing here, check out our explainer post.

Historically, to limit the impact offscreen images have on page load times, developers have needed to use a JavaScript library (like LazySizes or Vanilla-LazyLoad) in order to defer fetching these images until a user scrolls near them. What if the browser could avoid loading these offscreen images for you?

The loading attribute instructs a browser to defer loading offscreen images until users scroll near them. It comes in three flavors: eager, auto, and lazy. Install this plugin and you can set the first image’s loading attribute and the loading attribute for all the subsequent images sent through the_content() in the plugin’s settings page.

Simple is Beautiful

There is no JavaScript or CSS included in the plugin. It just works in browsers that support the new loading image attribute.

For browsers that don’t support this new image loading attribute, that’s ok. You can still use whatever JavaScript-based image lazy loader you want as a fallback until browser support becomes a little more mainstream.

Schermafdrukken

  • The Settings Page

Installatie

  1. Install Native Image Lazy Loading from the WordPress repo
  2. Activate the plugin through the Plugins menu
  3. Configure in Settings >> Native Lazy Loading
  4. Marvel at its simplicity

FAQ

Does this add any JS?

Nope. If you’re using another JS-based lazy loader, that’ll just keep working as it did. If the browser doesn\’t support the loading attribute, it’ll just ignore it and process per usual.

Where is the Settings Page?

In version 1.0 there wan’t one, but thanks to a suggestion by @verlok, there IS one in v1.1. You’ll find it at Settings >> Native Lazy Loading.

Beoordelingen

26 oktober 2019
The great things are: - very light plugin with no commercial adv or whatsoever... - Yes, it replaces <img with <img loading="lazy" But... - it replaced only 9 <img on 41 on my page ... anyway, thanks for trying to do the web a better place!
Lees 1 beoordeling

Bijdragers & ontwikkelaars

“Native Image Lazy Loading” is open source software. De volgende personen hebben bijgedragen aan deze plugin.

Bijdragers

Vertaal “Native Image Lazy Loading” naar jouw taal.

Interesse in ontwikkeling?

Bekijk de code, haal de SVN repository op, of abonneer je op het ontwikkellog via RSS.

Changelog

1.1

  • Added Settings Page
  • Added Option to select the loading="" attribute

1.0

  • First release.