Lazy Load for Videos


This plugin improves page load time and increases your Google PageSpeed Score. It works with oEmbed and replaces embedded Youtube and Vimeo videos with a clickable preview image.
By loading videos only when the user clicks on the preview image, no unnecessary JavaScript is loaded. Especially on sites with many embedded videos this will make your visitors happy. Additionally, all Youtube videos are loaded in a privacy-enhanced mode using the « » embed URL.

This plugin works for your existing YouTube and Vimeo blocks. No vendor lock-in and no custom shortcodes: Easily turn the plugin on and off anytime.

Demo on the developer’s website:

You want to enhance this plugin? Please contribute on Github.

Some additional features:

  • Display video titles on preview images
  • Display privacy disclaimer on top of preview images (e.g. for GDPR compliance)
  • Pre-roll and post-roll advertisements: Convert all videos into a playlist and automatically add your corporate video, product teaser or another video advertisement to every video. (Great for branding and video ads!)
  • Hide annotations such as « subscribe to channel » to avoid distractions
  • Add custom CSS via the plugin’s admin panel
  • Choose custom colour for your Vimeo player
  • Hide controls from Youtube player
  • Hide information like the video title and uploader when the video starts playing
  • Even lazy load videos in text widgets (Youtube only)
  • Choose between thumbnail sizes (standard or cover)
  • Choose from several play button styles
  • Choose the traditional red or the alternative white progress bar for the Youtube video player
  • Don’t show related videos at the end of your videos
  • Works with WordPress Multisite and many plugins such as TablePress

Future features:

  • Set a custom preview image per video
  • Track how often the videos have been loaded with Google Analytics
  • … YOU want a new feature RIGHT NOW? Please implement it yourself and contribute on Github, and I’ll publish your enhancements to the official WordPress directory.


If you have created your own language pack, or have an update of an existing one, you can send me your gettext PO and MO so that I can bundle it into my plugin. You can download the latest POT file from here.


  • Preview image with video title and white play button.
  • Preview image and red play button.
  • Options panel for admins (v2.2).
  • Options panel for admins (v2.2).
  • Options panel for admins (v2.2).


Upload Lazy Load for Videos into you plugin directory (/wp-content/plugins/) and activate the plugin through the ‘Plugins’ menu in WordPress.

When you had already published videos before you have activated Lazy Load for Videos, update all posts by clicking the « Update Posts » button below the « Save Changes » button.

You may have to clean the website’s and browser’s cache.

If you don’t see a preview image instead of the Youtube/Vimeo video, open the post editor and update/save the post again or even update all posts using the above mentioned « Update Posts » button.

Optionally: Sign up to the Lazy Load for Videos newsletter to get notified about major updates.

NOTICE – this is important to make your videos work as expected:
Easily insert the URL to your content (e.g. Youtube video) into a post or page. The URL must be on its own line and must not be hyperlinked. « WordPress will automatically turn [the URL] into a YouTube embed when the post is viewed. » (Source:
Inserting a Youtube iframe (instead of the plain URL) is deprecated and not supported by Lazy Load for Videos.


Search for keywords using « STRG + F » keyboard shortcut (Mac: « CMD + F »).

Where can I see this plugin in use?

For example, on

Which video platforms are supported?

Videos from the biggest video platform, Youtube (, and Vimeo ( are supported.

The plugin isn’t working with Jetpack…

« Jetpack » by offers some useful extensions. Only one of them makes Lazy Load for Videos break – the « Shortcode Embeds » extension. So simply disable the extension. (In order to see a « Deactivate » button for « Shortcode Embeds » on the Jetpack’s extension overview, you must click on « Learn More ».)

Does the Lazy Load for Videos plugin work when there is more than one video on the same page?

Yes. The plugin works on single posts and pages as well as on archive pages with several posts and videos.

Should I use the Lazy Load for Videos plugin?



  • If you want to speed your site up, this plugin is for you. Especially on sites with many embedded videos this plugin is gold. There are manz reasons why you should make your site faster, see next question.
  • The plugin is really lightweight, has no dependencies and does neither blow your performance nor your database up.
  • By loading the videos only when the user clicks on the preview image, no unnecessary JavaScript is loaded. You may know this issue: (Defer) Parsing of JavaScript. « In order to load a page, the browser must parse the contents of all tags, which adds additional time to the page load. By minimizing the amount of JavaScript needed to render the page, and deferring parsing of unneeded JavaScript until it needs to be executed, you can reduce the initial load time of your page. » (Source:
  • Video preview and play button are scalable and optimized for mobile devices.
  • Finally, Lazy Load for Videos is really easy to use. Simply upload and activate the plugin.

Why are a faster website and a higher Google PageSpeed Score great?

  • Search engines, especially Google, love speedy sites! So you will be higher ranked in search results.
  • Consequently, you get more visitors.
  • Fast sites lead to higher visitor engagement and returning visitors.
  • Faster sites increase conversions.
  • Potentially more $$ for your business!

How can I calculate my Google PageSpeed Score?

PageSpeed Insights is a service by Google to help you optimize your site’s performance. You can analyse your site using a browser extension or online, more information:

How to embed videos in WordPress?

Easily insert the URL to your content (e.g. Youtube video) into a post or page. The URL must be on its own line and must not be hyperlinked. « WordPress will automatically turn [the URL] into a YouTube embed when the post is viewed. » (Source:
Inserting a Youtube <iframe> (instead of the plain URL) is deprecated and not supported by Lazy Load for Videos.

How to disable lazy-loading of a single video?

Append &lazyload=0 to the video URL.

How to add support for custom post types?

UPDATE: Since plugin version 2.1.2, every custom post type is supported automatically. So you can ignore the following instructions. They will be removed with one of the next updates.

You can use a filter to add support for a custom post type (since version 2.0.4).
Replace ‘post_type_label’ with the name/label of your custom post type.

 * Set post types that shall support Lazy Load for Videos
function lazyload_videos_set_post_types( $post_types ) {
    $post_types[] = 'post_type_label';
    return $post_types;
add_action( 'lazyload_videos_post_types', 'lazyload_videos_set_post_types' );

How to use a custom play button?

For now, you can choose the « Youtube button image » from the play button drop-down list, then add the following custom CSS that includes a link to your custom CSS play button image:


.preview-youtube .lazy-load-youtube-div, .lazy-load-vimeo-div {
background-image: url(INSERT-YOUR-URL-HERE…/images/play.png);

Feature versions might include an option to change the colour of your CSS-only buttons using a colour picker and might also include an option to directly upload the desired button image.

How to lazy load playlists?

Similar to a single video, insert the playlist URL in the following format: (the other format – – is not supported currently).
Note that playlists are not working when you’re using the pre-/post-roll feature.

How can I report security bugs?

You can report security bugs through the Patchstack Vulnerability Disclosure Program. The Patchstack team help validate, triage and handle any security vulnerabilities. Report a security vulnerability.

Known bugs – this plugin may not work correctly when one of the following plugins is activated…

  • « YouTube » (
  • « Shortcode Embeds » extension within Jetpack, see answer above (
  • « BuddyPress » (
  • Thumbnails from Vimeo videos in « Privacy Mode » are not supported because Vimeo’s API doesn’t deliver thumbnails for those videos.
  • [???]


17 març 2024 1 reply
Well, it’s free, so that’s worth an extra star all by itself, but it doesn’t actually do anything. My site is exactly the same as it was without it. I installed it, set my settings, even changed the play button to « pulsing », hit the « update posts » button, and load-blocking iframe youtube embeds still display as the same load-blocking iframe youtube embeds they’ve always been. I checked the support forums and there’s a huge notice on top that the plugin is unsupported, so, uh, there goes the extra star it got for being free. A free plugin gets extra stars even if it doesn’t work perfectly, but a totally broken, totally unsupported plugin is 0 stars even if it’s free. I would have donated if it had worked, too.
11 març 2024
На одном сайте этот плагин заработал как надо, а на другом, где видео вставлены через <iframe> работать не стал. Зато с этой задачей прекрасно справился плагин WP YouTube Lyte.
24 Agost 2023 4 replies
HI Kevin,We sell 10,000 products and we edit and crate products using the Woocommerce CSV import/export.This plugin has added 5,000+ columns into the CSV file when it’s exported from Woocommerce…so it crashes the server and Google Sheets and Apple Numbers are unable to open the CSV because the plugin created too many columns. How can we stop the plugin from creating so much data in the database? If we uninstall it, will it delete all database data to solve this issue? We don’t see any settings in it that « removes all data upon uninstall » like other plugins…and we don’t know how to stop it from overloading the database other than to remove it…
23 julhet 2023
This plugin improved load times (especially for mobile in my case) on pages that had YouTube videos. It also hasn’t interfered with load times on pages without videos. Jetpack’s and WP Fastest Cache Premium’s lazy load functions INCREASED page loads for some reason (I think they are delaying the loading of featured psot image on one of my themes). Having the option to activate this function for videos only is clutch and is all I needed for my site to perform well. No lunch or promo but a big thank-you to the author
20 julhet 2023
I have videos with differing aspect ratios (4:3, 2.35:1, 9:16, 2:1, 1.85:1,…). Unfortunately, the plugin always shows the thumbnail in an aspect ratio of 16:9. Is there a way to make the plugin adapt to the aspect ratio of the video?
24 març 2024
Lazy Load for Videos is easy to understand, easy to use, and it does its job well. Thanks for the fine plugin.
Read all 105 reviews

Contributors & Developers

“Lazy Load for Videos” is open source software. The following people have contributed to this plugin.


“Lazy Load for Videos” has been translated into 2 locales. Thank you to the translators for their contributions.

Translate “Lazy Load for Videos” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.



  • Security: Patch potential CSRF attack vector


  • Support Youtube shorts. Thanks to @Borysiuk1’s PR


  • Bugfix: Prevent pages from breaking that rely on the JS object $ (usually used for jQuery) but don’t support $().ajaxStop


  • Support Vimeos that require usage of « h » query param
  • Add « No play button » option to not show any play button on top of videos
  • Exclude oembed metadata from WooCommerce product CSV export


  • Add « dnt=1 » query param to Vimeo URLs. This discourages Vimeo from using cookies and tracking session data.
  • New feature: Use the « Enable Vimeo cookies » admin option to opt into Vimeo tracking by adding « dnt=0 » to Vimeo URLs.


  • Prevent image blocks from getting converted into videos when selecting all blocks in block editor


  • Modernize list of permission policies in Youtube and Vimeo iframe


  • Bugfix: Prevent « Cannot declare class » errors


  • Handle missing video title and thumbnail data. PR from @markhowellsmead on Github:


  • Update styling of tabs on admin page
  • Escape video title and attribute texts so that they can be rendered when containing quotes


  • Bugfix: In rare cases the video only becomes visible when the window resizes. Hopefully this update fixes it…


  • Instead of extracting the video ID from the Vimeo URL, use the ID provided by the embed API to support the full range of Vimeo URL formats.


  • Support Vimeo thumbnails without file extension


  • Pass Vimeo embed URL query params to iframe


  • New feature: Set Vimeo thumbnail quality. The thumbnail quality option was previously limited to only Youtube and is now used for both Youtube and Vimeo.
  • Increase minimum Vimeo thumbnail width to 640px for a better resolution by default
  • Remove legacy « window.showThumb » Vimeo thumbnail fallback


  • New feature: Enable Youtube cookies. This option causes videos to be loaded using « » instead of the default « »
  • Disable plugin on AMP pages. Thanks to @mjaschen’s PR


  • Support block editor API v2
  • Explicitly set useCapture option for click events


  • Support HTML in text overlay


  • New feature: Enter text to be displayed on top of all video thumbnails, for example a privacy disclaimer.


  • No longer verify if wp_footer is available in theme


  • Add option to align videos


  • Make the « Only load CSS/JS when needed » feature smarter! Now instead of always loading all the lazy-loading JS whenever a post has any oembed (e.g. SoundCloud player), ensure that Youtube-specific and/or Vimeo-specific JS is only loaded based on if a Youtube and/or Vimeo embed is present.
  • Make « Higher quality » backward compatible


  • Add « Higher quality » option for Youtube preview images, a quality between « Standard quality » and « Max resolution »


  • Fix: Some sites seem to not call « save_post » reliably and therefore only the regular video iframe is shown instead of the preview image replacement. This update seems to fix the issue.


  • Fix: Show correct video thumbnail quality and ensure backward compatibility


  • New feature: Properly preview and play videos in the (Gutenberg) block editor with the same thumbnails and styles that your readers will see
  • Increased minimum browser support from IE10 to IE11
  • Smarter code splitting: Now Webpack splits shared code into separate bundles so that developers don’t need to manually maintain an extra Webpack entry. WordPress will load up three JS files if both Youtube and Vimeo are supported on your blog: lazyload-shared.js, lazyload-youtube.js, lazyload-vimeo.js, instead of one big lazyload-all.js
  • Allow filtering Vimeo-specific CSS classes using « lazyload_preview_url_css_vimeo » filter
  • Rename folder « assets » to « public »
  • Rename filter lazyload_preview_url_a_class_youtube to lazyload_preview_url_class_youtube
  • Use « wp_add_inline_script » (requires WordPress 4.5 or higher) instead of « wp_localize_script » and improve how scripts are being loaded
  • Increase minimum WordPress version to 4.5
  • The Youtube and Video configs are now stored in window.llvConfig instead of window.lazyload_video_settings
  • Remove RTL-specific CSS used for admin panel because it wasn’t properly maintained
  • Delete oembed caches when uninstalling plugin, not just when deactivating it
  • Delete transient oembed caches whenever oembed caches get deleted
  • No longer run $.bindFirst
  • Database: Rename value associated with standard thumbnail quality from « 0 » to « basic ». This value is stored in the « lazyload_thumbnail_quality » post meta row
  • Database: No longer add a « lazyload_thumbnail_quality » field to the DB if the value is « default »
  • Database: Remove « lazyload_thumbnail_quality » post meta when uninstalling the plugin


  • Fix: White arrow was overlaying the red Youtube play button
  • A few tiny invisible improvements


  • Fix: On some sites videos had large whitespace above and disappeared on play
  • Fix: Video jumped for on hover by one pixel in some themes and in theme preview


  • Undo 2.8.4


  • Fix: Videos disappeared in some themes when the block editor is used


  • Fix: Make Youtube start param without « s » work, e.g. « ?t=17 » (17 seconds)


  • Fix: Show correct thumbnails if multiple Youtube videos are on the same page
  • Speed up resizing of thumbnails on load


  • Lazy load video preview images, not just the video 🎉
  • Make « responsive mode » the default and only option


  • Load thumbnails for domain-restricted Vimeos (and possibly some other Vimeo cases)
  • Change language « es_MX » to « es_ES »


  • Add Spanish translation. PR from @po5i on Github:


  • Remove « VideoObject » video attributes because some mandatory descriptors are missing


  • Fix to allow autoplay Vimeo player on Chrome. PR from @po5i on Github:
  • Fix to make Vimeo URLs with query params in it work
  • Fix to prevent PHP warning « Invalid argument supplied for foreach() »


  • Fix issue where plugin didn’t work for users who never updated the settings of this plugin


  • Improve « Only load CSS/JS when needed » feature by scanning for embeds on pages with multiple posts (e.g. homepage, archive).
  • Add filter: lazyload_videos_should_scripts_be_loaded
  • No longer support « SCRIPT_DEBUG » variable for development


  • ️️⚡ Performance: Independence from jQuery! The user-facing part of this plugin no longer requires jQuery.
  • Privacy: Load all Youtube videos in privacy-enhanced mode using the URL
  • Rewrite large parts of the JavaScript to make maintenance and open source contributions easier and less risky.
  • Improve Ajax support, including support for Ajax Page Loader plugin. Thanks to @devattendant’s PR.
  • Show a link to the video if the browser doesn’t support JavaScript
  • Remove option to display a credit link in the top right corner of each video. This further reduces CSS and JS file sizes. Please consider donating instead:
  • Remove Youtube feature « Markup »
  • Remove Youtube feature « Hide Youtube logo »
  • Remove Youtube feature « Player colour » (has been deprecated for a while)
  • Remove Youtube feature « Relations » (Youtube no longer supports hiding related videos)
  • Remove Youtube feature « Hide title/uploader » (no longer supported by Youtube)
  • Reduce risk of conflicting class names with other plugins, see issue.


  • New feature: Hide Youtube logo from control bar by using Youtube’s modest branding feature.
  • Extend iframe code with allow attribute and values recommended by Youtube.


  • Use https for thumbnails.
  • Display background correctly if same Vimeo video is placed on the same page repeatedly.


  • NOTE: The HTML and CSS for videos has been adjusted, mostly affecting the Vimeo embed. If you’ve added any custom CSS, be warned. Otherwise, no need to worry.
  • NOTE 2: If video titles aren’t showing as expected, click on the « Update Posts » button on the admin page for this plugin.
  • A11y: Make it easier for screen readers to select both video types, Youtube and Vimeo.
  • I18n: Make « Play video » text translatable.
  • Fixed Vimeo title that didn’t show up if background pattern option was selected.
  • Reduced CSS and JS file sizes.


  • New feature: Display a pattern instead of a thumbnail and thereby avoid requests to a video platform (until the user clicks play and requests become necessary).
  • Automated CSS prefixing. Some prefixes are no longer added. (Supported browsers are defined in .browserslistrc file.)
  • For developers: Update all dependencies and Webpack.


  • New feature: Disable lazy-loading of a single video by appending lazyload=0 to the video URL.
  • Solved AMP error: « The attribute ‘video-title’ may not appear in tag ‘a’. ». NOTE: The change will only affect new and updated posts. Click on « Update Posts » in the admin panel to apply the change to all posts/pages.
  • Big refactoring: The plugin’s JavaScript and CSS is now organized in modules and the output files are generated using Webpack. This refactoring makes contributions possible/easier and allows development using modern, future-proof JavaScript.


  • Don’t show video link if preview image isn’t loaded yet.
  • Wait with displaying preview image until initial resize of video is done.
  • Fallback if visitor has no JavaScript: Display video title and URL.
  • Feature « Player color » for Youtube videos is now deprecated because Youtube doesn’t support it for its HTML5 player.
  • Reduced play button image file sizes.

  • Prevent other themes/plugins (such as BBPress) from displaying Youtube videos « inline » because this causes videos not to be displayed.
  • Set the default margin-bottom for iframes/embeds to « 0 ».

  • Now you can add a custom start time to each video URL. Use it like this: …url…/watch?v=VIDEO_ID&t=XhYmZs or …/watch?v=VIDEO_ID&t=Z (replace X/Y/Z with hours/minutes/seconds). Thanks to @R33D3M33R’s PR.
  • Removed « http » from URLs for https compatibility.

  • Added Serbian translation by Ogi Djuraskovic.

  • Fixed not working option to disable Vimeo.
  • Removed callback functionality.
  • Merged pull request from @R33D3M33R on Github ( Load video at custom start time wasn’t working properly. Background-image was always overriden, even if user has set a custom one.


  • The « i » link is now optional. By default, no information link is displayed.

  • Important: The wp_footer function in your theme is now required.
  • Combined several JavaScript files into one. Thanks to @summatix’s PR.
  • Added fallback by @summatix to load thumbnail with default quality when a high quality version is not available. Removed « Force maximum resolution » option because the fallback makes this feature unnecessary.
  • Made plugin translatable.

  • Fix: Updated URL definitions to improve js minify (merge request via Github by @sigginet)
  • Changed the background colour of loading preview images from black to transparent. You can use the following custom CSS to use black instead: .preview-lazyload { background-color: #000 !important; }

  • Fixed not working pre-roll and post-roll feature (values had not been stored).

  • The pre-roll and post-roll ads feature is now available for free! Please consider an appropriate donation.
  • Updated screenshots.

  • Added callback function.


  • Fix to make Vimeo working again.


  • Improvement: MUCH ENHANCED performance when updating all posts. Fewer queries, faster execution. Should fix the « Allowed memory size exhausted » issue that appeared on large sites with many posts.
  • Improvement: Support every kind of post type.
  • Fix/new feature: By default, max resolution is only used when a singular post/page is displayed. Users can choose to also load high quality thumbnails on archives and other pages using a « force » checkbox.
  • Fix: Replaced ‘<?=’ with ‘<?php echo’.
  • Improvement: Use not minified JavaScript files when SCRIPT_DEBUG is true (defined in wp-config.php).
  • Added version number to scripts.


  • Fix: Replaced incorrect ‘INCOLL_TDM_TD’ variable.
  • Fixed not correct commented out variables.
  • Fix: Replaced ‘<?=’ with ‘<?php echo’.


  • New feature: Add markup to your Youtube and Vimeo videos.
  • New feature: Hide title/uploader. Don’t display information like the video title and uploader when the video starts playing.
  • New feature: Hide annotations (such as « subscribe to channel »).
  • Improved colour picker.
  • Fix: Made ‘Update Posts’ working again.


  • Added red play button to the list of play buttons.
  • Added support for three more post types (any, home_slider, nectar_slider).
  • Fix: Display videos on BuddyPress activity streams.
  • Fix: Don’t duplicate branding links (as seen on BuddyPress activity streams).
  • Fix: Actually clear oembed cache when post is updated.


  • Improvement: Reduced memory usage when all posts are updated.
  • Thumbnail size « cover » is now default.
  • Fixed a responsive video bug.


  • Fix: Manually inserted links for Youtube playlists are working again.


  • Fix: « Update Posts » now also works for pages (not only for posts).
  • Added support for several often used post types (portfolio, news, article, articles, event, events, testimonial, testimonials, client, clients).


  • Improvement: Automatically clear oembed cache when a post is updated.


  • Fixed « unexpected T_PAAMAYIM_NEKUDOTAYIM ».


  • New feature: Youtube and Vimeo videos are responsive now! The video height automatically adjusts to its width
  • New feature: Set default thumbnail quality. Choose between standard and maximum resolution. You can override the default setting on every post and page individually.
  • Two new styles for the play button: « White Pulse » and « Black Pulse ».
  • Improvement: Use POST method to update all posts/pages.
  • Added very basic RTL (right-to-left) language support.


  • New feature (beta): Apply markup to videos
  • Fix: The new CSS play buttons caused some errors that have been fixed with this update
  • Fix: Use WordPress’ built in function to delete oembed caches. Much better performance! Now, again, do update all posts that have an oembedded medium when user activates the plugin
  • Fix: Actually remove the « i » link when the option to remove it is checked
  • Fix to make the plugin ready for WordPress 4.0 and its new feature to display video previews in editor


  • Wrapped videos into a div-container.


  • New feature: Choose from three play buttons (CSS-only white, CSS-only black, Youtube button image)
  • New premium feature: Convert Youtube videos into a playlist and automatically add your corporate video, product teaser or another video advertisement at the end of every Youtube video
  • New premium feature: Remove branding
  • New feature: With a colour picker the user can choose a colour of the video controls (Vimeo only)
  • New feature: Support for Youtube and Vimeo URLs in tables created with plugin TablePress
  • Improvement: User must not update articles anymore when he changes setting ‘Display Youtube title’
  • Fix/new feature: Users can activate an option to only load CSS/JS files on pages/posts when necessary. (It can happen that – when this option is activated – videos on pages do not lazy load although they should.)

  • Fix: Do NOT update all posts that have an oembedded medium when user activates the plugin anymore


  • New feature: When user -activates- or deactivates this plugin, all posts that have an oembedded medium will be updated once automatically
  • New feature: Users can update all existing posts manually
  • Improvement: Only load CSS/JS files on pages/posts when necessary


  • New feature: Choose between two colours for Youtube player (dark or light)
  • New feature: Support for widgets (Youtube only)
  • New feature: Choose thumbnail size (standard or cover)
  • New feature: Don’t display related videos at the end of your videos (Youtube only)
  • New feature: Hide controls from Youtube player (Youtube only)
  • New feature: Choose between two colours for Youtube player’s video progress bar to highlight the amount of the video that the viewer has already seen (red or white)


  • Important bugfix: Plugin v1.4 has not worked for new and updated posts
  • Bugfix: On some sites the plugin did not work as expected because a CSS height was not defined


  • New feature: Display video titles on preview images (for Youtube and Vimeo)
  • New feature: Admins can add Custom CSS via options panel


  • New feature: Support for Vimeo videos!!
  • New options panel for admins (now you can deactivate Lazy Load for Youtube/Vimeo in backend)
  • SEO: The preview image’s title attribute contains video’s title


  • Bugfix: ‘Infinite Scroll’ plugins are compatible with this plugin now


  • Added jQuery.noConflict to avoid some bugs (See:
  • This plugin now uses jQuery that comes with WordPress


  • Plugin goes public.