With the YouTube Data API, I can retrieve a list of thumbnail images for a video resource. This request...
GET https://www.googleapis.com/youtube/v3/videos?part=snippet&id=DUM1284TqFc&fields=items%2Fsnippet%2Fthumbnails&key={YOUR_API_KEY}
...generates this response...
{
"items": [
{
"snippet": {
"thumbnails": {
"default": {
"url": "https://i.ytimg.com/vi/DUM1284TqFc/default.jpg",
"width": 120,
"height": 90
},
"medium": {
"url": "https://i.ytimg.com/vi/DUM1284TqFc/mqdefault.jpg",
"width": 320,
"height": 180
},
"high": {
"url": "https://i.ytimg.com/vi/DUM1284TqFc/hqdefault.jpg",
"width": 480,
"height": 360
},
"standard": {
"url": "https://i.ytimg.com/vi/DUM1284TqFc/sddefault.jpg",
"width": 640,
"height": 480
},
"maxres": {
"url": "https://i.ytimg.com/vi/DUM1284TqFc/maxresdefault.jpg",
"width": 1280,
"height": 720
}
}
}
}
]
}
The maxres
object has a width
and height
of 1280
and 720
. However, the url
(https://i.ytimg.com/vi/DUM1284TqFc/maxresdefault.jpg) actually points to a 1920x1080 image.
It seems that the "maxres" thumbnail is generated with the same size as the original uploaded video, and the size of this particular video (https://youtu.be/DUM1284TqFc) was 1920x1080.
I cannot find a 1280x720 thumbnail image for this video.
- What do the
width
andheight
properties refer to? - How do I get the real width and height of the thumbnail images with the YouTube Data API?
- Is there a 1280x720 version of the thumbnail image?