Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade poster image to higher resolution webp if possible #167

Merged
merged 5 commits into from
Mar 3, 2024
Merged

Conversation

paulirish
Copy link
Owner

@paulirish paulirish commented Mar 3, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use the best thumbnail/placeholder/cover image available
1 participant