oembed – Avoid embedding YouTube videos and open them in a new window


I’d like to avoid loading as much foreign Javascript and Cookies as possible on a couple sites, and I’d like to know if there’s an easy way to avoid the embedding of YouTube videos, and instead, load a thumbnail, and on click, open them in a new window/tab.

Everything I see around oEmbed is about embedding the videos, not de-embedding them, 😛

There are a bunch of “load defer” or “lazy load” plugins, and the nearest I got to it has been with “WP YouTube Lyte“: it gets the video thumbnail from youtube, adds a “play” icon, and serves it statically on the page. Once you click on it, it loads the Youtube player.

This would be great if, instead of loading the player in place, it would send you to a new page, avoiding any cross-loading of scripts and cookies.

Can I use oEmbed in my favor?

Andor 4 weeks 2023-05-08T12:36:20-05:00 0 Answers 0 views 0

Leave an answer