YEP: Optimize YouTube Embeds

Përshkrim

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

Foto ekrani

  • screenshot-1.png – Plugin settings page in WordPress admin.
  • screenshot-2.png – Example of a YouTube embed before and after the plugin.

Instalim

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])

PBR

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

Shqyrtime

3 Shkurt, 2021
Useful plugin to help the website get good Google Pagespeed despite embedded Youtube videos.
9 Gusht, 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
Lexojini krejt 6 shqyrtimet

Kontribues & Zhvillues

“YEP: Optimize YouTube Embeds” është software me burim të hapur. Në këtë shtojcë kanë dhënë ndihmesë personat vijues.

Kontribues

“YEP: Optimize YouTube Embeds” është përkthyer në 2 gjuhë. Faleminderit përkthyesve për ndihmesën e tyre.

Përkthejeni “YEP: Optimize YouTube Embeds” në gjuhën tuaj.

Ju intereson zhvillimi?

Shfletoni kodin, shkarkoni depon SVN, ose pajtohuni përmes RSS-je te regjistri i zhvillimeve.

Regjistër ndryshimesh

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.