[ad_1]
Hi, just a quick suggestion:
Include youtube-nocookie.com in your script that loads video thumbnails. Embeds work the same and you can still use the same thumbnail url starting with ;
Maybe a bit of a fringe case, but I have hope that this isn’t too hard to implement.
On my site I convert any standard youtube embed into nocookie with this script:
// Add this to your plugin or functions.php file of your theme
function youtube_add_nocookie( $cached_html, $url, $attr, $post_id ) {
if ( preg_match('#https?://(www\.)?youtu#i', $url) ) {
return preg_replace(
'#src=(["\'])(https?:)?//(www\.)?youtube\.com#i',
'src=$1$2//$3youtube-nocookie.com',
$cached_html
);
}
return $cached_html;
}
add_filter( 'embed_oembed_html', 'youtube_add_nocookie', 99, 4 );
