yt-embed
yt-embed copied to clipboard
Support different image formats
I have made a video in a portrait format and would like to display the thumbnail in the same format. Something like an URL parameter for cropping the preview image would be a great addition!
@LinqLover Can you please post an easy to replicate scenario? i.e. sample video, actual & expected output.
Sorry, probably "format" was the wrong terminus. I was referring to the aspect ratio of images. Take an arbitrary portrait mode from YouTube and the thumbnail will still have a landscape ratio - it would be nice if you could use a URL like https://yt-embed.herokuapp.com/embed?v=3BYNj6Yvl8I&w=1080&h=1920
, or just &res=portrait
, or something similar. Just an idea :)
I added a change in https://github.com/0xbsec/yt-embed/commit/351066318b421d4e4f7f68707e59bcb24dc76217 so that you'll be able to specify which image format you need:
https://yt-embed.herokuapp.com/embed?v=DrI2lUXL1no&img=0
List of formats: https://stackoverflow.com/questions/2068344/how-do-i-get-a-youtube-video-thumbnail-from-the-youtube-api
Please let me know if this solve you issue.
Thank you, so there is no possibility to retrieve a portrait-mode thumbnail?