manifest / performance / youtube-oembed-lazy-load
YouTube oEmbed Lazy Load archived
WordPress plugin to Lazy Load YouTube video's in order to save bandwidth
by Roy Bongers · github.com/roy-bongers/youtube-oembed-lazy-load · website
★ 3stars
304composer installs
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/roy-bongers/youtube-oembed-lazy-load/archive/refs/heads/master.zipAlso on Packagist as roy-bongers/youtube-oembed-lazy-load:
composer require roy-bongers/youtube-oembed-lazy-loadFrom the readme
YouTube oEmbed Lazy Load
This WordPress plugin replaces the default YouTube embed with a still (image) from the video and a play button instead of embedding the whole iframe. Only the image will be downloaded instead of the entire YouTube iframe (around 600kB). This makes your page render a lot faster which is especially important on mobile devices. When the play button is clicked the iframe will be loaded and the video wil start auto-playing (for mobile, see known issues).
Usage
Use the default WordPress embed shortcode. The video will automatically be embeded with a still instead of the original iframe.
Requirements
PHP = 5.6 with php-xml module.
WordPress with the classic-editor plugin installed and activated.
Installation
Using composer simply execute:
Known issues
Gutenberg support
The plugin only works with the Classic editor and not with the new Gutenberg editor. I'm not planning to add support for Gutenberg. If you want to add support for Gutenberg please fork the project.
Autoplay on mobile
Google Chrome and other browsers are blocking autoplay on mobile devices unless they are muted. The plugin tries to play the video with audio. If this fails the video will start
Read the full README on GitHub →
Releases
These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.