← All articles

· 1 min read

How to Get the Default Thumbnail URL for a YouTube Video

Close-up of the YouTube website menu on a screen

Photo by Christian Wiediger on Unsplash

If you’ve ever wanted to use a thumbnail image from a YouTube video, you may have wondered how to get the URL for that image. YouTube provides a default URL format for the thumbnail images of their videos, which makes it easy to retrieve the thumbnail image URL for any video on the platform.

Let’s see how to get the thumbnail form the video: https://www.youtube.com/watch?v=r0VgFZv7o0k.

To get started, you’ll need to extract the video ID from the video URL. The video ID is the unique identifier that YouTube uses to identify each video on its platform, and it is included in the video URL. In this example, the video ID is r0VgFZv7o0k.

The format for the default thumbnail URL is as follows: https://i.ytimg.com/vi/[VIDEO_ID]/[THUMBNAIL_RESOLUTION].jpg where [VIDEO_ID] is the unique identifier for the YouTube video, and [THUMBNAIL_RESOLUTION] specifies the resolution of the thumbnail image.

Using the default thumbnail URL format, you can generate the thumbnail image URLs for any resolution that YouTube offers. Here are the default thumbnail URLs for the video with ID r0VgFZv7o0k in each available size:

Default resolution (120 x 90 pixels):

https://i.ytimg.com/vi/r0VgFZv7o0k/default.jpg

Medium quality resolution (320 x 180 pixels):

https://i.ytimg.com/vi/r0VgFZv7o0k/mqdefault.jpg

High quality resolution (480 x 360 pixels):

https://i.ytimg.com/vi/r0VgFZv7o0k/hqdefault.jpg

Standard definition resolution (640 x 480 pixels):

https://i.ytimg.com/vi/r0VgFZv7o0k/sddefault.jpg

Maximum resolution available for the video:

https://i.ytimg.com/vi/r0VgFZv7o0k/maxresdefault.jpg

That’s it! Now you know how to get the default thumbnail URL for any YouTube video, and you can use this knowledge to retrieve the thumbnail image URL for any video you want to use.

← All articles