YouTube maxresdefault thumbnails

Daniel Keeble picture Daniel Keeble · Jan 13, 2016 · Viewed 78.9k times · Source

I need to use the maxresdefault version of my YouTube video thumbnails for a website, however upon developing the code to achieve this I have found that not all of my videos have these thumbnails available, despite the videos all being 1080p.

Is there a way to automatically generate new high-res thumbnails for all of my videos?

Answer

Android Enthusiast picture Android Enthusiast · Jan 14, 2016

You can use YouTube Data API to retrieve video thumbnails, caption, description, rating, statistics and more. With the YouTube Data API, you can add a variety of YouTube features to your application.

For the high quality version of the thumbnail use a url similar to this:

 http://img.youtube.com/vi/<insert-youtube-video-id-here>/hqdefault.jpg

There is also a medium quality version of the thumbnail, using a url similar to the HQ:

http://img.youtube.com/vi/<insert-youtube-video-id-here>/mqdefault.jpg

For the standard definition version of the thumbnail, use a url similar to this:

http://img.youtube.com/vi/<insert-youtube-video-id-here>/sddefault.jpg

For the maximum resolution version of the thumbnail use a url similar to this:

http://img.youtube.com/vi/<insert-youtube-video-id-here>/maxresdefault.jpg

Here's the Official Google Documentation for Youtube API https://developers.google.com/youtube/v3/docs/thumbnails

Here's where I get my answer: How do I get a YouTube video thumbnail from the YouTube API?