--- title: Boost Youtube Videos Load Time In WordPress date: 2017-03-18 00:00:00 featured_image: https://images.unsplash.com/photo-1568941136405-b1d44d9aefb9?q=90&fm=jpg&w=1000&fit=max excerpt: Although it easy to embed youtube videos but you will be surprised of the increase in loading time of your webpage. --- ![](https://images.unsplash.com/photo-1568941136405-b1d44d9aefb9?q=90&fm=jpg&w=1000&fit=max) Although it easy to embed youtube videos but you will be surprised of the increase in loading time of your webpage. So i created a wordpress plugin that will show a thumbnail image of a YouTube video and the actual video player is loaded only when the user manually clicks the thumbnail. You will find a significant change in loading time especially if your webpage contain many youtube videos. [You can check & download the plugin at github.](https://github.com/Clivern/fast-yt-videos) Also You can check the code here: ```php * in your post content */ class CliverFastYTVideos { function init() { add_action('wp_head', array( &$this, 'headerPrint' )); add_action('wp_footer', array( &$this, 'footerPrint' )); add_filter('the_content', array( &$this, 'filterContent' )); } /** * Print code in header * * @since 1.0 * @access public */ public function headerPrint() { ?> /si','
', $content); return $content; } } $clivern_fast_yy_video = new CliverFastYTVideos(); $clivern_fast_yy_video->init(); ```