License: GPLv3
License URI: http://www.gnu.org/licenses/gpl-3.0.html
A plugin to reduce initial page bandwidth for website images and most iframes; uses the browser intersection API to load images and iframes when coming into view.
Based on the best practice software to detect and lazy load media this plugin updates the markup in your images and iframes when rendering your page.
- Reduce your site bandwidth on initial load.
- Then the plugin loads images and iframes to be ready for display in the browser viewport
- Works with images on category / archive pages.
- Works with avatars
- Works with
- Works with images inside galleries - only loading in the images when they are needed.
- With this plugin enabled it can contribute to improved results in Lighthouse audits or audits run from https://web.dev/
- Image tag markup is handled when it is generated with WordPress functions
I use and include the lazysizes lazy load library - thank you
This lazy load library came as a recommendation. I was running website audits and the audit results referred to this library to help with image loading. You can find out more from web.dev
You can clone this repo to your plugins
folder and activate from your dashboard.
or
First, in this repository, click on "Clone or Download" and then "Download Zip". Then follow the regular WordPress instructions below.
- Navigate to the 'Add New' in the plugins dashboard
- Search for 'media-lazy-load'
- Click 'Install Now'
- Activate the plugin on the Plugin dashboard
- Navigate to the 'Add New' in the plugins dashboard
- Navigate to the 'Upload' area
- Select
media-lazy-load.zip
from your computer - Click 'Install Now'
- Activate the plugin in the Plugin dashboard
- Download
media-lazy-load.zip
- Extract the
media-lazy-load
directory to your computer - Upload the
media-lazy-load
directory to the/wp-content/plugins/
directory - Activate the plugin in the Plugin dashboard
Does it modify and save my markup? No, it only adjusts the display during page generation when displaying your content
- Readme updates
- Handling Gutenberg cover image, Gutenberg gallery support, checking for customizer, REST request
- First version, adding lazysizes script, parsing markup, adding class to images and iframe based media