A simple tool to embed Youtube videos in a better way

After reading another topic, I had a quick idea of making a simple tool to embed youtube videos to Ghost posts with a more customized, performant and privacy friendly way. And here it is:

And here is the tool url: Better YouTube Embed - Privacy-First YouTube Embed Generator

The differences comparing to built-in Youtube embedder of Ghost Editor:

  • It uses www.youtube-nocookie.com which is a domain provided by Youtube for a better privacy. As its name suggests, it doesn’t have user tracking cookies.
  • It doesn’t directly load iframe, instead just shows cover image with a play button on it. So your page loads much faster.
  • You can also use a custom cover image instead of video’s default one. This allows you to take control of how you present your page.
  • You need to add with HTML card, instead of direct link.

As far as I see, it works quite good on email and ActivityPub content, since main HTML code just shows the cover image with an SVG icon on top of it. On those platforms that doesn’t run JS code, clicking cover image just routes reader to the actual Youtube video link.

I find it quite useful for myself. I hope it helps others as well :blush:

9 Likes

Cheers. Will give it a swirl and compare it to the solution I got from a friendly local LLM :slight_smile: .

Thanks for making this! Do you know if there would be a way to get it to work with YouTube Shorts? With that 9:16 aspect ratio in mind, a left or right align option would also be welcome.

1 Like

Very nice!
It’s perfect on activitypub.

On email (gmail), I don’t have the svg overlay, so it’s much less obvious that it’s a video (unless the thumbnail image makes it clear) – I can see users not realizing something was a video instead of an image. I’m not sure if there’s much to be done there without adding and uploading a separate image, unfortunately.

1 Like

I just updated with Youtube Shorts and vertical mode support, please check again :blush:

I’m glad you liked it. I was not aware that play icon is not visible on Gmail. Maybe Gmail doesn’t like embedded SVG :thinking: I’ll try to check soon.

Wow - that was speedy! Thank you!

1 Like

My recollection is that gmail really doesn’t like svgs…

1 Like