Skip to content
Functions to add the `loading=“lazy”` attribute when inserting new media or displaying a gallery via the WordPress gallery shortcode.
PHP
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
LICENSE
lazy.php
readme.md

readme.md

=== WP Lazy ===
Contributors: seezee
Donate link: https://messengerwebdesign.com/donate
Tags: wordpress, filter, images, performance, lazy load
Requires at least: 3.9
Tested up to: 5.2.2
Requires PHP: 7.0
Stable tag: 1.0.2
License: GNUv3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html

== Description ==

Functions to add the loading="lazy" attribute when inserting new media or displaying a gallery via the WordPress gallery shortcode.

== Installation ==

3 WAYS TO USE THESE FUNCTIONS

  1. Copy the contents of lazy.php to your theme’s functions.php. DO NOT include the opening <?php tag!
  2. Place lazy.php in your theme folder and use require_once __DIR__ . '/path/to/lazy.php'; to invoke it
  3. Incorporate the functions in a custom plugin

== Frequently Asked Questions ==

What are these functions for?

Allows WordPress users to use native lazy-loading now that several major browsers support it.

How may I help improve this code?

I’d love to hear your feedback. Drop me a line.

I’d like to do more

I’m looking for collaborators to improve the code. If you are an experienced WordPress programmer, hit me up!

I’d like to do even more

Feel free to send a donation to my Paypal account. Or buy me a beer if you’re in town.

== Changelog ==

= 1.0.2 =

  • 2012-09-06
  • Clarified usage option one in installation instructions

= 1.0.1 =

  • 2012-08-22
  • Corrected README errors

= 1.0.0 =

  • 2012-08-22
  • Initial release == Upgrade Notice ==

= 1.0.2 =

  • 2012-09-06
  • Clarified usage option one in installation instructions
You can’t perform that action at this time.