YouTube maxresdefault thumbnails
Asked Answered
L

5

45

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?

Louanne answered 13/1, 2016 at 9:59 Comment(0)
W
49

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?

Wedding answered 14/1, 2016 at 8:33 Comment(8)
I need to use the maxresdefault.jpg, however for a bunch of my videos they simply do not exist. How can I fix this?Louanne
This does not really answer OP's question..it's only a (useful) collection of data about different YT thumbnailsMeissen
@ErenorPaz Unfortunately, you are correct. The only way I solved this was to re-generate a thumbnail for every video that was missing a maxres version.Louanne
I suppose that was the only thing to do :) :)Meissen
Looks like the format has been changed to: https://i.ytimg.com/vi_webp/<VIDEO_ID>/maxresdefault.webpAde
@Mr.Polywhirl, please post the latest format/answer for others know about it. thank youWedding
@AndroidEnthusiast I added my response. – ThanksAde
On a 1080p video, the maximum resolution I can get for the thumbnail is 720p. Is there no way to get the 1080p version? Example: i.ytimg.com/vi_webp/vIRZfVOwKkE/maxresdefault.webpSherly
R
14

I just ran into the same issue while working on a new website project using videojs-youtube. Some of my videos simply didn't have a maxresdefault.jpg and were thus throwing an error. A thread on the YouTube Help Forums resolved it.

Simply go into the Video Manager (found under Creator Studio), change the thumbnail to one of the original 3 defaults generated by YouTube, save it, leave the page, and then change back to the original thumbnail. Somehow, this generated the maxresdefault.jpg for me and fixed it. I'm going to assume this is a bug on YouTube's end where it just doesn't generate the image.

Recumbent answered 9/1, 2018 at 23:25 Comment(1)
I also discovered that I was using a custom (uploaded) thumbnail that was only 640 pixels wide instead of 1920.Provoke
A
3

Updated as on December 2019.

https://i.ytimg.com/vi_webp/<VIDEO_ID>/maxresdefault.webp
https://i.ytimg.com/vi/<VIDEO_ID>/maxresdefault.jpg
https://i.ytimg.com/vi/<VIDEO_ID>/hqdefault.jpg

You can add a bookmarklet to your browser:

javascript:window.open('https://i.ytimg.com/vi/' + /^.*(youtu.be\/|v\/|embed\/|watch\?|youtube.com\/user\/[^#]*#([^\/]*?\/)*)\??v?=?([^#\&\?]*).*/.exec(window.location)[3] + '/maxresdefault.jpg', target = "_blank")

If you click on it, while viewing a YouTube video, it will open the thumbnail image for the video in a new tab.

Ade answered 4/12, 2019 at 18:27 Comment(1)
No, this doesn't work, still preview images not showedWhitewood
C
0

Maxres thumbnail is not created instanly on Youtube apis, you should check for maxres availability and use the standard size in the meantime

Coatee answered 13/1, 2023 at 4:13 Comment(0)
T
-1

Mr. Polywhirl posted "Looks like the format has been changed to: https://i.ytimg.com/vi_webp/VIDEO_ID/maxresdefault.webp"

I've been seeing that myself for most new(ish) youtube videos. After about 5 minutes of trying to change it so that renders it as a jpg instead of a webp, I found this method.

WEBP VERSION https://i.ytimg.com/vi_webp/VIDEO_ID/maxresdefault.webp

JPG VERSION https://i.ytimg.com/vi/VIDEO_ID/maxresdefault.jpg

Toxicosis answered 27/9, 2019 at 0:42 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.