YEP: Optimize YouTube Embeds

Plugin Banner

YEP: Optimize YouTube Embeds

by Webamator

Download
Description

YouTube iframe embeds often load many unnecessary resources, which slows down your page. YEP: Optimize YouTube Embeds is a lightweight WordPress plugin that replaces YouTube iframes with a clickable preview image.
The actual video loads only when the user clicks the play button, improving page load times and reducing initial page size.

External services

This plugin uses the external YouTube thumbnail service (https://i.ytimg.com) to display preview images of YouTube videos.
When a page with a YouTube embed is loaded, the plugin requests the thumbnail image directly from YouTube servers.
No personal data is sent from your site to YouTube, only the video ID (already public in the YouTube URL).

Privacy Policy: https://policies.google.com/privacy
Terms of Service: https://www.youtube.com/t/terms

Installation via WP Dashboard is very easy. Just use the ‘Plugins’ -> ‘Add New’ screen, put “YEP: Optimize YouTube Embeds” in the search form and click “Install Now”.
Manual installation via FTP is very straightforward as well:
1. Upload the plugin files to the /wp-content/plugins/ directory.
2. Activate the plugin through the ‘Plugins’ screen in WordPress.
3. Use the ‘Settings’ -> ‘YouTube Embed’ menu to change default options.
4.1 Just insert Youtube URL in post (example https://www.youtube.com/watch?v=5Fv19KVVya8)
4.2 Or use shortcode (example [yep_youtube width=”XXX” height=”XXX” nocookie=”0″ controls=”1″ start=”03:45″]5Fv19KVVya8[/yep_youtube])

  1. screenshot-1.png - Plugin settings page in WordPress admin.

    screenshot-1.png - Plugin settings page in WordPress admin.

  2. screenshot-2.png - Example of a YouTube embed before and after the plugin.

    screenshot-2.png - Example of a YouTube embed before and after the plugin.

Does this plugin guarantee a 100% Google PageSpeed score?

This plugin only improves PageSpeed for pages with YouTube videos. If your page already scores 100% without videos, this plugin will maintain that score. Remember, to achieve 100% you need a fast theme, proper caching, image optimization, and other performance tweaks.

Is this plugin responsive?

Yes. By default (shortcodes without “width” and “height” attributes) it is responsive.

Can I contribute translations for this plugin?

Yes. You can contribute via the plugin page on my blog or create a new topic on the wordpress.org forum or help improve the translation.

I found a bug

Please report it via the Plugin page on my blog, leave a comment in a post about YEP: Optimize YouTube Embeds or create a new topic on the wordpress.org forum.

I would like a feature added

You can contact me. You can use the Plugin page on my blog. If you wish some premium feature, you can hire me on Upwork. In this case mark your message please, for example “premium YEP for WP”.

I want to help

Top plugin!

By ncschulze on February 3, 2021

Useful plugin to help the website get good Google Pagespeed despite embedded Youtube videos.

Best Youtube Embed ever

By windantara on May 22, 2020

i hope you always update if needed

Awesome, it did the trick in the best way

By alaaalshamey on April 14, 2020

Awesome, it did the trick in the best way

Awesome and simple plugin that gets the job done!

By artembychkov on September 9, 2019

This cute little plugin solved my issue with Google PageSpeed for all pages that have YouTube videos! Get 98-100 performance scores now!

This plugin works better than WP YouTube Lyte

By baksteendegeweldige on August 9, 2019

This plugin does it job better than WP YouTube Lyte. If you use WP YouTube Lyte, Google pagespeed says you need to remove or defer the youtube css www-player-sprite-mode... If you use this plugin everything runs smooth. If you use autoptimize together with this plugin you need to exclude yep.js from being optimized by autoptimize

"5 stars"

By svetlanadoroshina on July 12, 2019

Real helpfull. Thank you!

1.1.2

  • NEW: added support for alt and title attributes in the shortcode (applied to the preview image).

1.1.1

  • FIX: minor fixes and improvements (e.g., better handling of old embeds)
  • IMPROVED: compatibility checks and admin notices

1.1.0

  • NEW: tested for WP 6.8
  • NEW: Gutenberg compatibility
  • IMPROVED: Enhanced sanitization and escaping for improved security
  • IMPROVED: Refactored code for better performance and readability
  • SECURITY: Enhanced sanitization and escaping for safer output.

1.0.4

  • NEW: tested for WP 5.3.2
  • FIX: rename classes and translations

1.0.3

  • Solved small JS issue (addEventListener).

1.0.2

  • Added shortcode.

1.0.1

  • Write simple plugin.
Back to top