[CinVin] Lazy Load YouTube Videos for Xenforo 2

XenForo 2 [CinVin] Lazy Load YouTube Videos for Xenforo 2 1.1.0

No permission to download
Visible Branding
Additional Requirements
XenForo 2.2.x
This is a small add-on that defers loading embedded YouTube videos until the user clicks on the play button.

A preview image is shown as a placeholder with the familiar YouTube 'play' button on top. The video is not loaded until the play button is clicked.

For threads with a lot of embedded YouTube videos, such as the "What are you listening to?" thread here at Alien Soup, this allows the thread to load faster and helps users browsing on slower internet connections and/or older devices.

Please note: On some browsers, such as Chrome for Android devices, the video will not auto-play after being clicked. It will load after clicking the 'play' button but the user must then click the 'play' button of the newly loaded video. This is a restriction of the browser and can not be overridden.

Lazy Load YouTube in Addons.PNG
Lazy Load YouTube Page Load.PNG
Lazy Load YouTube Playing.PNG

As of version 1.1.0 there are two new options available in the ACP => System and Performance Settings.

The option Use 'Youtube-Nocookie' Domain When Playing Videos will use the domain "youtube-nocookie.com" instead of the default "youtube.com" when the videos are loaded. This is part of Google's YouTube Privacy-Enhanced Mode.

The option Use YouTube Webp Preview Images will use .webp preview images instead of the default .jpg images. Important to note... not all videos have .webp preview images! Turning this option may result in some videos, especially older ones, having no preview image shown.

  • Like
Reactions: Askqurdu and solmaz
First release
Last update


0.00 star(s) 0 ratings

More resources from Kevin

Latest updates

  1. 1.1.0 - New Options

    Added a couple of new options... ACP => System and Performance => Use 'Youtube-Nocookie' Domain...
  2. 1.0.6 - Tweaked CSS for XFMG

    Slight update to tweak the cinvin_lazyloadyoutube.less CSS for XFMG so that the lazy loaded YT...
  3. 1.0.5 - Updated attributes and fix 'preview'

    Since the release of XF 2.2 it has been bugging me that the editor 'preview' mode wasn't showing...