Closed cbirdsong closed 1 month ago
Thanks for the excellent issue and PR, @cbirdsong. I think I'm on board but want to mull it over just a bit more. It will certainly increase the loading time for pages with a lot of videos. I think I may want to at least provide a filter to let that get customized, but I definitely think it's worth adding control.
If I do this, I also want to resolve #3 (solved in a local branch) with it, so that any old videos without the higher-quality thumbnails aren't penalized.
I don't have an ETA for the next release, but I'll land something for this in it for sure. Thanks again!
Anecdotally, I'm seeing a ~3x increase in image size between the two, but I'm not sure how much that would matter in practice since the image is loading="lazy"
? I'd be curious to see some testing of both sizes in practice.
A filter and/or settings screen with the option is probably a good idea either way.
The default poster image size for
<lite-youtube>
is "hqdefault", which I guess is 480x360. This looks bad when displayed full width in a content area. The component does support aposterquality
attribute that accepts values that apparently correspond to the following resolutions:Considering how the embed block renders, I think maxresdefault/1280x720 is the only reasonable choice for most sites. I would guess the default content area width in most themes is larger than sddefault's width of 640px.
(YouTube should really provide more granularity here, but I guess they didn't leave themselves much wiggle room after naming the 720p size "max res".)