Simple Lazy Load for embedded video from YouTube and Vimeo
The plugin reduces page load time and increases your Google PageSpeed score.
It replaces the embedded YouTube and Vimeo videos with a video preview image, third-party CSS & JS are downloaded only after a click.
- Upload the plugin to your WordPress site
- Activate the plugin in the Plugin dashboard
Instead of loading the iframe of your video on page load, it only loads the video preview image. This will work automatically for all videos that have been inserted through the standard page editor.
Yes, you can use the [sllv_video] shortcode using a link to a YouTube or Vimeo video as its value, like:
[sllv_video]https://youtu.be/GywDFkY3z-c[/sllv_video]A shortcode can contain several additional attributes:
thumbnail - alternate thumbnail URL, in case the auto-generated one doesn't suit you
play - URL with an alternate image for the Play button, in case you're not happy with the default button
hide_play - if you give any value to this attribute, such as "1", then the Play button will not be displayed
Yes, but you cannot insert a shortcode [sllv_video] into your template file directly.
You will need to pass the code into apply_shortcodes() function (WordPress 5.4+, or do_shortcode() in older versions) and display its output like this:
<?php echo apply_shortcodes( '[sllv_video]https://youtu.be/GywDFkY3z-c[/sllv_video]' ); ?>- Add support for youtube-nocookie.com links
- Fix a bogus video ID for YouTube links with extra characters after the ID
- Fix fatal error when the Vimeo API returns an unexpected response
- Update packages
- Tested up to: 7.2
- Add support for Vimeo start time (
#t=parameter) - Fix gap above videos inserted with the Embed block in themes that support responsive embeds
- Fix Vimeo showcase, album and event links being replaced with a broken video
- Fix YouTube "Error 153" on sites with a
no-referrerReferrer-Policy - Delete cached thumbnails and Vimeo API responses on uninstall
- Escape the "Settings" and "GitHub" links on the Plugins screen
- Remove the deprecated YouTube
showinfoparameter - Code refactoring
- Update packages
- Add support for unlisted Vimeo videos
- Add support for YouTube start time (
t=andstart=parameters) - Add support for YouTube live links and share links with extra parameters
- Lazy load videos in content loaded via AJAX (e.g. "Load more", infinite scroll)
- Fix YouTube playlists being replaced with a broken video
- Fix fatal error when saving settings on PHP 8
- Fix outdated version in CSS/JS links, so browsers get the updated files
- Fix plugin translations not loading
- Fix gray YouTube placeholder when the selected thumbnail size does not exist, now falls back to hqdefault
- Fix broken image when the video thumbnail is not available
- Fix
[sllv_video]shortcode with encoded or wrapped URLs - Fix
hide_playshortcode attribute not working together withplay - Fix "Settings" and "GitHub" links appearing for other plugins with the same file name
- Fix PHP notices with incomplete plugin settings
- Do not flush the site's oEmbed cache on a fresh install
- Validate plugin settings against allowed values
- Cache failed Vimeo API requests
- Accessibility: add title to the player, move focus to the player after start
- Allow picture-in-picture and encrypted media in the player
- Tested up to: 7.1
- Fix SCSS codestyle
- Update packages
- Speed-related optimizations
- Update packages (including sass)
- Update browserslist rules
- Fix stable tag
- Update *.pot file
- Fix WPCS compliance for JS
- Improve media_playing() JS function, now it uses event delegation on the capture phase to handle dynamically added media
- Migrate from jQuery ajaxComplete to native MutationObserver
- Optimize plugin initialization to reduce frontend load
- Improve remote API data fetching robustness
- Update packages
- Update old changelog entries
- Update Grunt configs
- Update Grunt packages
- Tested up to WordPress 7.0
- Update Grunt config
- Update Grunt packages
- Tested up to WordPress 6.9
- Fix PHP error
- Get YouTube thumbnails in WEBP format if exists
- Fix "Links are not crawlable" issue
- Remove line breaks and tabs to fix extra
<br>in the final code. - Move SVG to separate files
- Refactor Functions::remote_api_get() method
- Replace creating new instance of classes with static methods
- Fix methods visibility
- Remove global $sllv variable
- Fix WPCS compliance
- Update Grunt packages
- Tested up to WordPress 6.8.1
- Add new search key in preg_match for short YouTube videos (thanks @paulooliveirar)
- Fix WPCS
- Update Grunt packages
- Fix Notice "Function _load_textdomain_just_in_time was called incorrectly"
- Fix visibility of some methods
- Remove grunt-spritesmith
- Update Grunt packages
- Tested up to WordPress 6.7.1
- Add shortcode attributes: thumbnail, play, hide_play
- Update FAQ
- Update Grunt packages
- Tested up to WordPress 6.6.2
- Fix missing jQuery error
- Add BuddyPress support
- Tested up to WordPress 6.4.2
- Remove styles from admin_enqueue_scripts
- Remove old admin styles from CSS
- Replace dart-sass to sass
- Change esversion in jshint config to 8
- Update packages
- Fix svg
- Fix WPCS
- Tested up to WordPress 6.4.1
- Add filters:
sllv_youtube_button,sllv_vimeo_button,sllv_video_template - Remove jQuery from depends scripts
- Rename CSS & JS handles
- Tested up to WordPress 6.3
- Refactoring
- Add GitHub link to plugin meta
- Add Gutenberg support
- New oEmbed template logic
- Do template replacement only on frontend
- Fix Vimeo thumbnail