Youtube embed size, revisited

If you prioritize looks over the benefits of LazyYT (blocks Google tracking every user since it doesn’t load the full iFrame, the page isn’t as heavy for the same reason) you can just delete the lazyYT from the plugin folder and it will fallback to standard oembeds:


Just had to set the iframe width to 690

I spent way too much time researching YouTube APIs, and in order to make LazyYT use better thumbnails (which can fit our 690px post width) we would have to ask every admin to signup for Youtube API keys, implement logic of falling back to the current thumbnails since old youtube videos doesn’t have HD thumbnails and it wasn’t really worth the effort. So if you just want it to look cool, just run a simple rm -rf plugin/lazyYT in the run hook in your app.yml.

Totally #pr-welcome if someone who cares about this and want to implement a better thumbnail logic to LazyYT which accounts for all the cases:

  • Admin doesn’t have an API key configured
  • API key is invalid
  • Video is too old
  • Video has thumbnail, pick the higher resolution one (maybe make it configurable so people can match their forum width)
7 Likes