Internet Documentation: With these URLs you get Youtube thumbnails in different sizes and quality levels.
Youtube thumbnails: use cases and common issues
Why do I need Youtube thumbnails? In various contexts within my blog I use Youtube videos. There, it is often handy if I can reuse the image that is displayed on Youtube when the video is unloaded. For example as a cover image or in a slide. Taking screenshots from the actual videos is often not recommended, because in most cases they are blurred and of poor quality.
So it’s good that the Youtube API as well as the servers offer different images of a video as static .jpg files. There are a few things to keep in mind with these images:
- Many of the images are too small to include in desktop versions.
- Within a video there are different moments that are available as thumbnails.
URL scheme and thumbnail locations at a glance
For demonstration purposes, I’ll take one of my youtube videos from the esport event Homepfosten Cup “Matchday 2 vs. DavidSW | Match ReCap”, which can be accessed at the URL
The most important thing here is the marked youtube video ID in the URL: N6TXuZJ3KkU – I will need this for all following operations.
Thumbnail URL scheme
The thumbnails are all accessible on a special subdomain via a special URL structure. This is marginally different from the video URL:
img.youtube.com/vi/[video-ID]/[thumbnail-name].jpg // Thumbnail URL
www.youtube.com/watch?v=[video-ID] - Video URL
Accordingly, the [video-ID] parameter will remain the same in sequence, while the [thumbnail-name] parameter will change.
Default Thumnbnail 0
With the extension /0.jpg, I can retrieve the default thumbnail that Youtube displays in multiple locations across their platform.
img.youtube.com/vi/[video-ID]/0.jpg // Thumbnail 0
Standard Thumbnail Default
The Default thumbnail displays the same scene as the /0 thumbnail. It is available via the /default.jpg path. Unfortunately the image is – in my opinion – to small to actually use it anywhere.
img.youtube.com/vi/[Video-ID]/default.jpg // Thumbnail Default
Standard Thumbnails 1 – 3
With the thumbnail paths /1.jpg, /2.jpg, /3.jpg I get images from different sequences of the video. Unfortunately, these are mostly too small for me to embed them.
img.youtube.com/vi/[Video-ID]/1.jpg // Thumbnail 1
img.youtube.com/vi/[Video-ID]/2.jpg // Thumbnail 2
img.youtube.com/vi/[Video-ID]/3.jpg // Thumbnail 3
Standard Quality – SD
If I need the 0 thumbnail in a slightly larger size I can use /sddefault.jpg path. The sd stands for standard definition.
img.youtube.com/vi/[Video-ID]/sddefault.jpg // Default Thumbnail in Standard Definition
The sd-Prefix also works on the 1, 2, 3 thumbnails.
img.youtube.com/vi/[Video-ID]/sd1.jpg // Thumbnail 1 in Standard Definition
img.youtube.com/vi/[Video-ID]/sd2.jpg // Thumbnail 2 in Standard Definition
img.youtube.com/vi/[Video-ID]/sd3.jpg // Thumbnail 3 in Standard Definition
High Quality Thumbnails with the HQ-Prefix
Where there is Standard Definition there is likely also High Definition. This also applies to youtube Thumbnails. You will find High Definition Thumbnails using a HQ-prefix in the URL paths.
img.youtube.com/vi/[Video-ID]/hqdefault.jpg // Default Thumbnail in High Definition
Knowing by now how the prefix-method works, we can also generate High Defintion Thumbnails for the Thumbnail1, Thumbnail2 and Thumbnail 3 versions like this:
img.youtube.com/vi/[Video-ID]/hq1.jpg // Thumbnail 1 in High Definition
img.youtube.com/vi/[Video-ID]/hq2.jpg // Thumbnail 2 in High Definition
img.youtube.com/vi/[Video-ID]/hq3.jpg // Thumbnail 3 in High Definition
Medium Quality Thumbnails
There is also away to generate “medium” quality thumbnails using the mq-prefix (Medium Definition):
img.youtube.com/vi/[Video-ID]/mqdefault.jpg // Default Thumbnail in Medium Quality
And here is where I find the medium definition thumbnails for scenes 1 to 3:
img.youtube.com/vi/[Video-ID]/mq1.jpg // Thumbnail 1 in Medium Quality
img.youtube.com/vi/[Video-ID]/mq2.jpg // Thumbnail 2 in Medium Quality
img.youtube.com/vi/[Video-ID]/mq3.jpg // Thumbnail 3 in Medium Quality
MaxResDefault for the best quality available
A good approach to get the best quality thumbnails is to use the /maxresdefault.jpg path. It automatically returns high quality images. Unfortunately it is only available if the associated videos were actually uploaded in good quality. I.e. it is mostly is only available for recent uploads.
img.youtube.com/vi/[Video-ID]/maxresdefault.jpg // Default Thumbnail in Max Resolution
*Unfortunately my videos are not of high quality. Therefore, I have to use a tagesschau video to illustrate the thumbnail format:
There is another option to fetch the image. By using the /hq720.jpg filepath.