{"id":165861,"date":"2022-11-23T03:44:04","date_gmt":"2022-11-23T03:44:04","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/better-youtube-embed-block\/"},"modified":"2026-06-10T08:20:51","modified_gmt":"2026-06-10T08:20:51","slug":"better-youtube-embed-block","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/better-youtube-embed-block\/","author":9299724,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.1.6","stable_tag":"1.1.6","tested":"7.0","requires":"6.9","requires_php":"7.0","requires_plugins":null,"header_name":"Embed YouTube Block","header_author":"Phi Phan","header_description":"Embed youtube video without slowing down your site.","assets_banners_color":"","last_updated":"2026-06-10 08:20:51","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/boldblocks.net\/?utm_source=wp.org&utm_campaign=readme&utm_medium=link&utm_content=BYEB+Donate","header_plugin_uri":"https:\/\/boldblocks.net?utm_source=BYEB&utm_campaign=visit+site&utm_medium=link&utm_content=Plugin+URI","header_author_uri":"https:\/\/boldblocks.net","rating":5,"author_block_rating":5,"active_installs":6000,"downloads":54035,"num_ratings":16,"support_threads":1,"support_threads_resolved":1,"author_block_count":6,"sections":["description","installation","faq","changelog"],"tags":{"1.0.1":{"tag":"1.0.1","author":"Mr2P","date":"2023-08-09 16:57:43"},"1.0.2":{"tag":"1.0.2","author":"Mr2P","date":"2023-10-30 06:34:20"},"1.0.3":{"tag":"1.0.3","author":"Mr2P","date":"2024-01-05 01:17:11"},"1.0.4":{"tag":"1.0.4","author":"Mr2P","date":"2024-04-03 01:18:23"},"1.0.5":{"tag":"1.0.5","author":"Mr2P","date":"2024-07-17 01:03:59"},"1.1.0":{"tag":"1.1.0","author":"Mr2P","date":"2024-10-28 03:20:50"},"1.1.1":{"tag":"1.1.1","author":"Mr2P","date":"2024-11-09 03:06:08"},"1.1.2":{"tag":"1.1.2","author":"Mr2P","date":"2025-04-14 03:55:54"},"1.1.3":{"tag":"1.1.3","author":"Mr2P","date":"2025-12-01 02:41:06"},"1.1.4":{"tag":"1.1.4","author":"Mr2P","date":"2026-01-12 07:45:28"},"1.1.5":{"tag":"1.1.5","author":"Mr2P","date":"2026-05-06 04:01:48"},"1.1.6":{"tag":"1.1.6","author":"Mr2P","date":"2026-06-10 08:20:51"}},"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":16},"assets_icons":{"icon.svg":{"filename":"icon.svg","revision":3523945,"resolution":false,"location":"assets","locale":false}},"assets_banners":[],"assets_blueprints":{},"all_blocks":{"boldblocks\/youtube-block":{"$schema":"https:\/\/schemas.wp.org\/trunk\/block.json","apiVersion":3,"name":"boldblocks\/youtube-block","title":"Embed YouTube Video","category":"media","description":"Faster than the default YouTube embed. Supports videos, shorts and playlists.","keywords":["youtube","video","embed","insert"],"attributes":{"url":{"type":"string","__experimentalRole":"content"},"caption":{"type":"string","source":"html","selector":"figcaption","__experimentalRole":"content"},"aspectRatio":{"type":"string","default":"","__experimentalRole":"content"},"isMaxResThumbnail":{"type":"boolean","__experimentalRole":"content"},"thumbnailFormat":{"type":"string","default":""},"customThumbnail":{"type":"string","__experimentalRole":"content"},"settings":{"type":"object"}},"supports":{"align":true,"spacing":{"margin":true},"interactivity":{"clientNavigation":true}},"textdomain":"better-youtube-embed-block","editorScript":"file:.\/index.js","viewScript":"file:.\/frontend.js","editorStyle":"file:.\/index.css","style":"file:.\/style-index.css"}},"tagged_versions":["1.0.1","1.0.2","1.0.3","1.0.4","1.0.5","1.1.0","1.1.1","1.1.2","1.1.3","1.1.4","1.1.5","1.1.6"],"block_files":["\/tags\/1.1.6\/build\/index.js","\/tags\/1.1.6\/build\/index.css","\/tags\/1.1.6\/build\/style-index.css"],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3176557,"resolution":"1","location":"assets","locale":"","width":1196,"height":534},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3176557,"resolution":"2","location":"assets","locale":"","width":361,"height":1005}},"screenshots":{"1":"<p>Block edit screen<\/p>","2":"<p>Block settings<\/p>"}},"plugin_section":[172757],"plugin_tags":[1220,230,148076,222,1610],"plugin_category":[56],"plugin_contributors":[203545],"plugin_business_model":[],"class_list":["post-165861","plugin","type-plugin","status-publish","hentry","plugin_section-block","plugin_tags-block","plugin_tags-embed","plugin_tags-gutenberg","plugin_tags-video","plugin_tags-youtube","plugin_category-social-and-sharing","plugin_contributors-mr2p","plugin_committers-mr2p"],"banners":[],"icons":{"svg":"https:\/\/ps.w.org\/better-youtube-embed-block\/assets\/icon.svg?rev=3523945","icon":"https:\/\/ps.w.org\/better-youtube-embed-block\/assets\/icon.svg?rev=3523945","icon_2x":false,"generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/better-youtube-embed-block\/assets\/screenshot-1.png?rev=3176557","caption":"<p>Block edit screen<\/p>"},{"src":"https:\/\/ps.w.org\/better-youtube-embed-block\/assets\/screenshot-2.png?rev=3176557","caption":"<p>Block settings<\/p>"}],"raw_content":"<!--section=description-->\n<p>The default embed block for YouTube videos sucks. It slows down your site. The more videos on the page the more it slow. This single-block plugin fixes that.<\/p>\n\n<p>Why this block is better than the default one:<\/p>\n\n<ul>\n<li>Instead of loading the entire iframe, only the video thumbnail is loaded, resulting in significant performance improvements<\/li>\n<li>Ability to play multiple different videos as a custom playlist or input a playlist ID to play the whole playlist<\/li>\n<li>Ability to use a custom image as the video thumbnail<\/li>\n<li>Ability to set a custom aspect ratio value for displaying any kind of YouTube videos<\/li>\n<li>Ability to loop continuously once it finishes playing<\/li>\n<li>Ability to show related videos from the same channel as the initial video<\/li>\n<li>Automatically load the video title as the caption<\/li>\n<li>The same UI as the default core\/embed, and you can use the video title as the caption of the block with one click<\/li>\n<li>It can be transformed from\/to the core embed block.<\/li>\n<li>Automatically convert all default core embed YouTube blocks to this block with one line of code.<\/li>\n<\/ul>\n\n<p>This plugin also provides a PHP API for developers to render a YouTube video URL as this block; or to automatically transform core\/embed YouTube videos into this block.<\/p>\n\n<p>The simplest example is:<\/p>\n\n<pre><code>    better_youtube_embed_block_render_block( ['url' =&gt; 'https:\/\/youtu.be\/paSXmpHU9K4'] );\n<\/code><\/pre>\n\n<p>The example with all the parameters is:<\/p>\n\n<pre><code>    better_youtube_embed_block_render_block(\n      [\n        'url'               =&gt; 'https:\/\/youtu.be\/paSXmpHU9K4',\n        'aspectRatio'       =&gt; '16\/9',\n        'isMaxResThumbnail' =&gt; false,\n        'thumbnailFormat'   =&gt; 'jpg',\n        'caption'           =&gt; 'My awesome video',\n        'caption_kses'      =&gt; false,\n        'customThumbnail'   =&gt; 'https:\/\/example.com\/bg.jpg',\n        'settings'          =&gt; ['loop' =&gt; 1, 'rel' =&gt; 0],\n        'echo'              =&gt; false,\n      ]\n    );\n<\/code><\/pre>\n\n<p>To automatically transform all core\/embed YouTube videos on your site to this block, you need to put the following code to the wp-config.php file or your theme\/plugin:<\/p>\n\n<pre><code>    define('BYEB_SPEED_UP_YOUTUBE_VIDEOS', true);\n<\/code><\/pre>\n\n<p>or<\/p>\n\n<pre><code>    add_filter( 'byeb_speed_up_youtube_videos', '__return_true' );\n<\/code><\/pre>\n\n<p>On iOS, browsers like Safari and Chrome require two clicks to play videos. If you want to allow users to play videos with a single click, you need to add the following code to the wp-config.php file or your theme\/plugin:<\/p>\n\n<pre><code>    define('BYEB_FORCE_IFRAME_ON_UNSUPPORTED_BROWSERS', true);\n<\/code><\/pre>\n\n<p>Please check out this <a href=\"https:\/\/contentblocksbuilder.com\/video-tutorials\/?utm_source=wp.org&amp;utm_campaign=readme&amp;utm_medium=link&amp;utm_content=BYEB\">page<\/a> to see how fast it helps. The page contains around 30 embedded YouTube videos but they don't slow down the page.<\/p>\n\n<p>If this plugin is useful for you, please do a quick review and <a href=\"https:\/\/wordpress.org\/support\/plugin\/better-youtube-embed-block\/reviews\/#new-post\">rate it<\/a> on WordPress.org to help us spread the word. I would very much appreciate it.<\/p>\n\n<p>Please check out my other plugins if you're interested:<\/p>\n\n<ul>\n<li><strong><a href=\"https:\/\/wordpress.org\/plugins\/content-blocks-builder\">Content Blocks Builder<\/a><\/strong> - Build custom layouts and blocks visually in the Block Editor without needing a code editor, using only core blocks and native Gutenberg features.<\/li>\n<li><strong><a href=\"https:\/\/wordpress.org\/plugins\/display-a-meta-field-as-block\">Meta Field Block<\/a><\/strong> - A single block to display custom fields in the Block Editor without coding. It supports ACF, MetaBox, WooCommerce, meta, rest field, shortcode and more. Works everywhere: in the Site Editor (FSE), the Block Editor, inside Query Loop, WooCommerce Product Collection, Term Query blocks, and even in template files.<\/li>\n<li><strong><a href=\"https:\/\/wordpress.org\/plugins\/svg-block\">SVG Block<\/a><\/strong> - A block to display SVG images as blocks. Useful for images, icons, dividers, and buttons. It allows you to upload SVG images and load them into the icon library.<\/li>\n<li><strong><a href=\"https:\/\/wordpress.org\/plugins\/icon-separator\">Icon separator<\/a><\/strong> - A tiny block just like the core\/separator block but with the ability to add an icon.<\/li>\n<li><strong><a href=\"https:\/\/wordpress.org\/plugins\/breadcrumb-block\">Breadcrumb Block<\/a><\/strong> - A simple breadcrumb trail block that supports JSON-LD structured data and is compatible with WooCommerce.<\/li>\n<li><strong><a href=\"https:\/\/wordpress.org\/plugins\/block-enhancements\">Block Enhancements<\/a><\/strong> - Adds practical features to blocks like icons, box shadows, transforms, etc.<\/li>\n<li><strong><a href=\"https:\/\/wordpress.org\/plugins\/counting-number-block\">Counting Number Block<\/a><\/strong> - A block to display numbers with a counting effect<\/li>\n<\/ul>\n\n<p>The plugin is developed using @wordpress\/create-block.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the plugin files to the <code>\/wp-content\/plugins<\/code> directory, or install the plugin through the WordPress plugins screen directly.<\/li>\n<li>Activate the plugin through the 'Plugins' screen in WordPress<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"what%20problem%20does%20this%20plugin%20solve%3F\"><h3>What problem does this plugin solve?<\/h3><\/dt>\n<dd><p>It provides a better solution to embed YouTube videos than the default one.<\/p><\/dd>\n<dt id=\"who%20needs%20this%20plugin%3F\"><h3>Who needs this plugin?<\/h3><\/dt>\n<dd><p>Anyone can use this plugin.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.1.6<\/h4>\n\n<p><em>Release Date - 10 June 2026<\/em><\/p>\n\n<ul>\n<li>Added - Support for displaying overlay text on video thumbnails, such as a YouTube cookie consent notice<\/li>\n<\/ul>\n\n<h4>1.1.5<\/h4>\n\n<p><em>Release Date - 06 May 2026<\/em><\/p>\n\n<ul>\n<li>Added    - <code>caption_kses<\/code> parameter to the helper function, allowing inline HTML tags (<code>&lt;a&gt;<\/code>, <code>&lt;em&gt;<\/code>, <code>&lt;strong&gt;<\/code>) in video captions when using the custom API function.<\/li>\n<li>Added    - New hook <code>better_youtube_embed_block_render_block_args<\/code> to modify the helper function parameters.<\/li>\n<li>Improved - Updated setting controls for compatibility with WordPress 7.0<\/li>\n<\/ul>\n\n<h4>1.1.4<\/h4>\n\n<p><em>Release Date - 06 January 2026<\/em><\/p>\n\n<ul>\n<li>Added    - Block binding support for the url and caption attributes.<\/li>\n<li>Improved - Handling of the frontend script when hosts or cache plugins defer or delay it.<\/li>\n<\/ul>\n\n<h4>1.1.3<\/h4>\n\n<p><em>Release Date - 21 July 2025<\/em><\/p>\n\n<ul>\n<li>Added - Support for loading WebP thumbnails to reduce file size.<\/li>\n<\/ul>\n\n<h4>1.1.2<\/h4>\n\n<p><em>Release Date - 06 January 2025<\/em><\/p>\n\n<ul>\n<li>Fixed   - The captions of old YouTube videos are not converted to this block when automatically transforming core\/embed to this block.<\/li>\n<li>Updated - Requires at least WordPress version 6.5<\/li>\n<\/ul>\n\n<h4>1.1.1<\/h4>\n\n<p><em>Release Date - 09 November 2024<\/em><\/p>\n\n<ul>\n<li>Fixed - a CSS conflict between the play button and button styles in some themes<\/li>\n<\/ul>\n\n<h4>1.1.0<\/h4>\n\n<p><em>Release Date - 23 August 2024<\/em><\/p>\n\n<ul>\n<li>Added   - Play multiple videos or the whole playlist<\/li>\n<li>Added   - Loop continuously once it finishes playing<\/li>\n<li>Added   - Show related videos from the same channel<\/li>\n<li>Added   - Allow rendering embeded frame when browsers require click two times to play videos<\/li>\n<li>Updated - Requires at least WordPress version 6.3<\/li>\n<\/ul>\n\n<h4>1.0.5<\/h4>\n\n<p><em>Release Date - 15 June 2024<\/em><\/p>\n\n<ul>\n<li>Added   - Support custom thumbnail for videos<\/li>\n<li>Added   - Allow editing media settings in the contentOnly mode<\/li>\n<li>Updated - Change the 'Requires at least' to 6.0<\/li>\n<li>Added   - Support clientNavigation interactivity<\/li>\n<\/ul>\n\n<h4>1.0.4<\/h4>\n\n<p><em>Release Date - 23 February 2024<\/em><\/p>\n\n<ul>\n<li>Added - Add a PHP API for developers to render a YouTube video URL as this block<\/li>\n<li>Added - A new option to load high-resolution image<\/li>\n<li>Added - Add the ability to render all core\/embed for YouTube videos as this block<\/li>\n<\/ul>\n\n<h4>1.0.3<\/h4>\n\n<p><em>Release Date - 05 January 2024<\/em><\/p>\n\n<ul>\n<li>Added - Custom aspect ratio<\/li>\n<li>Added - Margin support feature<\/li>\n<\/ul>\n\n<h4>1.0.2<\/h4>\n\n<p><em>Release Date - 11 August 2023<\/em><\/p>\n\n<ul>\n<li>DEV - Update to apiVersion 3<\/li>\n<li>DEV - Change i18 texts for translation<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<p><em>Release Date - 21 April 2023<\/em><\/p>\n\n<ul>\n<li>DEV - Add keywords to the block<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Release Date - 23 November 2022*<\/li>\n<\/ul>","raw_excerpt":"Embed YouTube videos without slowing down your site. Easily embed one or multiple videos, shorts, and playlists.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/165861","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=165861"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/mr2p"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=165861"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=165861"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=165861"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=165861"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=165861"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=165861"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}