Title: Load Video On Click
Author: Jose Mortellaro
Published: <strong>6.1.2022</strong>
Last modified: 1.10.2026

---

Hae lisäosia

![](https://ps.w.org/load-video-on-click/assets/banner-772x250.png?rev=2653796)

![](https://ps.w.org/load-video-on-click/assets/icon-256x256.png?rev=2653796)

# Load Video On Click

 [Jose Mortellaro](https://profiles.wordpress.org/giuse/)

[Lataa](https://downloads.wordpress.org/plugin/load-video-on-click.0.0.5.zip)

 * [Tiedot](https://fi.wordpress.org/plugins/load-video-on-click/#description)
 * [Arvostelut](https://fi.wordpress.org/plugins/load-video-on-click/#reviews)
 * [Kehitys](https://fi.wordpress.org/plugins/load-video-on-click/#developers)

 [Tuki](https://wordpress.org/support/plugin/load-video-on-click/)

## Kuvaus

Videos will not worse anymore the performance if they load only after clicking on
the play button.

### How to load videos on click

 * Install and activate Load Video On Click
 * Embed the videos using the shortcode [load_video_on_click] (see below) or by 
   activating the switch ”Load on click” of the Video and Embed blocks (in case 
   of Gutenberg)

### Integrations

You can always add the provided shortcode, no matter which builder you are using.
However, the actual version provides a full integration with the following builders(
no need for the shortcode):

 * WPBakery
 * Gutenberg

### Shortcode

Shortcode name: load_video_on_click

### Shortcode parameters:

 * link: Video URL
 * el_id: ID for custom CSS
 * el_aspect: video aspect ratio
 * el_class: class for custom CSS
 * image_placeholder: Image to be loaded instead of the video. You can use the ID
   or the URL of the image.
 * load_on_click: Set on to load the video only after clicking on the button, or
   off to load it on page loading

Shortcode example:

[load_video_on_click link=”https://www.youtube.com/watch?v=AQ3FoNHC6SU” image_placeholder
=”356″]

IF you embed a Youtube video and don’t set the image placeholder parameter, the 
plugin will get it directly from Youtube.
 For the other video providers or if you
self host the video file, you need to set the parameter image_placeholder, in another
case people will only see a play button before loading the video.

### Gutenberg

If you use Gutenberg, the blocks Embed and Video will have the switch ”Load on click”.
Activate that switch to load the embedded video after clicking on the play button.

Don’t forget to set a Poster Image. It will be taken as placeholder before starting
the video.

### Help

For any question or if something doesn’t work, don’t hesitate to open a thread on
the [support forum](https://wordpress.org/support/plugin/load-video-on-click/).

### Backend Speed Optimization

Is your dashboard slow? We optimize admin performance by improving queries and reducing
plugin load.
 Read [Backend Speed Optimization Service](https://josemortellaro.com/backend-speed-optimization/)
for more information.

### For developers

#### Filter hooks

’load_video_on_click_for_blocks’

It enables/disables the loading on click for existing videos added with the Video
and Embed blocks (Gutenberg).

Example:

    ```
    add_filter( 'load_video_on_click_for_blocks','__return_true' ); //It enables the loading on click for all videos added with the Video and Embed blocks
    ```

’load_video_on_click_image_placeholder’

You can use it to replace the image placeholder.

Example:

    ```
    add_filter( 'load_video_on_click_image_placeholder',function( $url,$attrs ){
      //$attrs is the array of parameters in case of shortcode, and the block attributes in case of Gutenberg blocks
      if( false !== strpos( $url,'yout' ) ){
        //Same image placeholder for all Youtube videos
        return wp_get_attachment_url( 2009 );
      }
      return $url;
    },2,20 );
    ```

## Arvostelut

There are no reviews for this plugin.

## Avustajat & Kehittäjät

“Load Video On Click” perustuu avoimeen lähdekoodiin. Seuraavat henkilöt ovat osallistuneet
tämän lisäosan kehittämiseen.

Avustajat

 *   [ Jose Mortellaro ](https://profiles.wordpress.org/giuse/)

[Käännä “Load Video On Click” omalle kielellesi.](https://translate.wordpress.org/projects/wp-plugins/load-video-on-click)

### Oletko kiinnostunut kehitystyöstä?

[Browse the code](https://plugins.trac.wordpress.org/browser/load-video-on-click/),
check out the [SVN repository](https://plugins.svn.wordpress.org/load-video-on-click/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/load-video-on-click/)
by [RSS](https://plugins.trac.wordpress.org/log/load-video-on-click/?limit=100&mode=stop_on_copy&format=rss).

## Muutosloki

#### 0.0.5

*Fix: stripped curly double-quotes when shortcode copied by the WordPress plugin
page

#### 0.0.4

*Fix: solved conflict with Real Cookie Banner

#### 0.0.3

*Fix: displayed only first video

#### 0.0.2

*Added: support to self hosted video
 *Added: support to core/embed and core/video
block

#### 0.0.1

*Initial release

## Metatiedot

 *  Version **0.0.5**
 *  Last updated **2 viikkoa sitten**
 *  Active installations **100+**
 *  WordPress version ** 4.6 or higher **
 *  Tested up to **7.1.3**
 *  PHP version ** 5.6 or higher **
 *  Language
 * [English (US)](https://wordpress.org/plugins/load-video-on-click/)
 * Tags
 * [performace](https://fi.wordpress.org/plugins/tags/performace/)[video](https://fi.wordpress.org/plugins/tags/video/)
   [videos](https://fi.wordpress.org/plugins/tags/videos/)
 *  [Edistynyt näkymä](https://fi.wordpress.org/plugins/load-video-on-click/advanced/)

## Arvosanat

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/load-video-on-click/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/load-video-on-click/reviews/)

## Avustajat

 *   [ Jose Mortellaro ](https://profiles.wordpress.org/giuse/)

## Tuki

Onko sinulla jotain sanottavaa? Tarvitsetko apua?

 [Tukifoorumi](https://wordpress.org/support/plugin/load-video-on-click/)

## Lahjoita

Haluatko tukea tämän lisäosan kehitystä?

 [ Tue tämän lisäosan tekijöitä ](http://buymeacoffee.com/josem)