=== YEP: Optimize YouTube Embeds ===
Contributors: Webamator
Donate link: https://www.paypal.com/donate/?hosted_button_id=E3PFX4WXM3BMN
Tags: video,YouTube embed,optimize,performance,lazy load
Requires PHP: 7.4
Requires at least: 5.2
Tested up to: 6.8
Stable tag: 1.1.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Short Description: Load YouTube videos faster by replacing iframes with a preview image; the video plays only when clicked play.

== 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

== Frequently Asked Questions ==

= 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](https://www.helper-wp.com/plugins/youtube-embed-plugin-wordpress/) or [create a new topic on the wordpress.org forum](https://wordpress.org/support/plugin/yep-youtube-embed/) or [help improve the translation](https://translate.wordpress.org/projects/wp-plugins/yep-youtube-embed/).

= I found a bug =

Please report it via the [Plugin page on my blog](https://www.helper-wp.com/plugins/youtube-embed-plugin-wordpress/), [leave a comment in a post about YEP: Optimize YouTube Embeds](https://wordpress.org/plugins/yep-youtube-embed/) or [create a new topic on the wordpress.org forum](https://wordpress.org/support/plugin/yep-youtube-embed/).

= I would like a feature added =

You can contact me. You can use the [Plugin page on my blog](https://www.helper-wp.com/plugins/youtube-embed-plugin-wordpress/). If you wish some premium feature, you can [hire me on Upwork](https://www.upwork.com/freelancers/~01be316f1125fbe965). In this case mark your message please, for example "premium YEP for WP".

= I want to help =

* Report any bugs you find
* [Confirm compatibility with your WP version on wordpress.org](https://wordpress.org/plugins/yep-youtube-embed/)
* [Rate the plugin on wordpress.org](https://wordpress.org/plugins/yep-youtube-embed/)
* [Help improve translations](https://translate.wordpress.org/projects/wp-plugins/yep-youtube-embed/)

== Installation ==

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


== Screenshots ==

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


== Changelog ==

= 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.


== Upgrade Notice ==

= 1.1.2 = 
Added support for alt and title attributes in the shortcode.

= 1.1.1 =
Minor fixes and improvements.

= 1.1.0 =
Tested with WordPress 6.8+. Improved security, better performance, and Gutenberg compatibility.
 
= 1.0.4 =
This version has a small fix and tested for WP 5.3.2




