Upgrade poster image to higher resolution webp if possible #167
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fixes #70.
The default has been the
hqdefault
jpg, which is only 360px tall, but standard embed height is 405px. So it's always been getting scaled.With this PR, we still default to the above jpg, but we'll see if the
sddefault
webp (480px tall) is available for the specific video. If so, we swap it in.ref #76
You can always just have ultimate control over the poster image by setting a
style=background-image
manually: https://github.com/paulirish/lite-youtube-embed/#custom-poster-image (long-time feature).And I made an interactive page that finds the best poster image available for your video: https://paulirish.github.io/lite-youtube-embed//testpage/poster-image-availability.html
See youtube-thumbnail-urls.md for the full topic.