Resource: ThumbnailDetails
Identifies different thumbnail image sizes associated with a YouTube resource.
- A resource's
snippet.thumbnailsproperty contains the thumbnail images available for that resource, keyed by image size (default,medium,high, and so on). - Different resource types support different thumbnail sizes and define different dimensions for the same size name. For example, the
defaultthumbnail is 120px wide and 90px tall for a video resource, and 88px wide and 88px tall for a channel resource. - Resources of the same type can expose different thumbnail sizes depending on the resolution of the original image or video. For example, higher resolution videos or custom thumbnails can support
standard,maxres,fhd,qhd, oruhdimages. - Each thumbnail object has
widthandheightproperties, though these dimensions might not be returned for every resource (for example, channel search results return onlyurl). - If an uploaded thumbnail image doesn't match the required dimensions, YouTube resizes it without changing its aspect ratio. For standard videos, the image isn't cropped and might include black bars to fill the frame. For YouTube Shorts, custom thumbnail images are center-cropped to a 9:16 portrait aspect ratio (up to 2160px wide and 3840px tall).
| JSON representation |
|---|
{ "default": { "url": string, "width": integer, "height": integer }, "medium": { "url": string, "width": integer, "height": integer }, "high": { "url": string, "width": integer, "height": integer }, "standard": { "url": string, "width": integer, "height": integer }, "maxres": { "url": string, "width": integer, "height": integer }, "uhd": { "url": string, "width": integer, "height": integer }, "fhd": { "url": string, "width": integer, "height": integer }, "qhd": { "url": string, "width": integer, "height": integer }, "shortsAspectRatio": { "url": string, "width": integer, "height": integer } } |
| Fields | |
|---|---|
default |
The default thumbnail image. For a video (or a resource that refers to a video, such as a playlist item or search result), this image is 120px wide and 90px tall. For a channel, this image is 88px wide and 88px tall. |
default.url |
The thumbnail image's URL. |
default.width |
The thumbnail image's width in pixels. |
default.height |
The thumbnail image's height in pixels. |
medium |
A higher resolution version of the thumbnail image. For a video (or a resource that refers to a video), this image is 320px wide and 180px tall. For a channel, this image is 240px wide and 240px tall. |
medium.url |
The thumbnail image's URL. |
medium.width |
The thumbnail image's width in pixels. |
medium.height |
The thumbnail image's height in pixels. |
high |
A high resolution version of the thumbnail image. For a video (or a resource that refers to a video), this image is 480px wide and 360px tall. For a channel, this image is 800px wide and 800px tall. |
high.url |
The thumbnail image's URL. |
high.width |
The thumbnail image's width in pixels. |
high.height |
The thumbnail image's height in pixels. |
standard |
A higher resolution version of the thumbnail image than the |
standard.url |
The thumbnail image's URL. |
standard.width |
The thumbnail image's width in pixels. |
standard.height |
The thumbnail image's height in pixels. |
maxres |
A high resolution (720p) version of the thumbnail image. This image size is available for some videos and other resources that refer to videos, such as playlist items or search results. This image is 1280px wide and 720px tall. |
maxres.url |
The thumbnail image's URL. |
maxres.width |
The thumbnail image's width in pixels. |
maxres.height |
The thumbnail image's height in pixels. |
uhd |
The ultra-high resolution (4K) version of the thumbnail image. This image size is available for some non-Shorts videos; YouTube generates at most one of |
uhd.url |
The thumbnail image's URL. |
uhd.width |
The thumbnail image's width in pixels. |
uhd.height |
The thumbnail image's height in pixels. |
fhd |
The full high definition (1080p) version of the thumbnail image. This image size is available for some non-Shorts videos; YouTube generates at most one of |
fhd.url |
The thumbnail image's URL. |
fhd.width |
The thumbnail image's width in pixels. |
fhd.height |
The thumbnail image's height in pixels. |
qhd |
The quad high definition (1440p / 2K) version of the thumbnail image. This image size is available for some non-Shorts videos; YouTube generates at most one of |
qhd.url |
The thumbnail image's URL. |
qhd.width |
The thumbnail image's width in pixels. |
qhd.height |
The thumbnail image's height in pixels. |
shortsAspectRatio |
The Shorts aspect ratio (9:16) version of the thumbnail image. This image size is available for YouTube Shorts that have a custom thumbnail set. Its dimensions depend on the uploaded image, up to 2160px wide and 3840px tall. |
shortsAspectRatio.url |
The thumbnail image's URL. |
shortsAspectRatio.width |
The thumbnail image's width in pixels. |
shortsAspectRatio.height |
The thumbnail image's height in pixels. |
Methods |
|
|---|---|
|
Uploads a custom video thumbnail to YouTube and sets it for a video, including YouTube Shorts. |