Getting a YouTube Video Thumbnail

Grab the thumbnail for any YouTube video straight from its URL, in every available size.

  • YouTube thumbnails can be accessed directly using a standard URL pattern: https://img.youtube.com/vi/%VIDEO-ID%/0.jpg, replacing %VIDEO-ID% with the video's ID.
  • The URLs 0.jpg through 3.jpg return screenshot images: 0.jpg is full size, while 1.jpg, 2.jpg, and 3.jpg are scaled thumbnails.
  • Named quality options are available for the video's default image: default.jpg (default quality), mqdefault.jpg (medium), hqdefault.jpg (high), sddefault.jpg (standard definition), and maxresdefault.jpg (highest resolution).
  • All of these URLs also work over https, so you can swap http for https.
  • You can use the shorthand domain i3.ytimg.com in place of img.youtube.com to shorten the URLs.

Grabbing a YouTube video thumbnail is easier than you’d think. YouTube uses a standard naming convention for it’s screenshot images, just replace %VIDEO-ID% with a YouTube video ID in the format below and link directly to the image.

https://img.youtube.com/vi/%VIDEO-ID%/0.jpg
https://img.youtube.com/vi/%VIDEO-ID%/1.jpg
https://img.youtube.com/vi/%VIDEO-ID%/2.jpg
https://img.youtube.com/vi/%VIDEO-ID%/3.jpg

0.jpg is full size, while others are scaled thumbnails. There are also other sizes available for the default image that is being used for the video.

Default quality

https://img.youtube.com/vi/%VIDEO-ID%/default.jpg

High quality

https://img.youtube.com/vi/%VIDEO-ID%/hqdefault.jpg

Medium quality

https://img.youtube.com/vi/%VIDEO-ID%/mqdefault.jpg

Standard definition

https://img.youtube.com/vi/%VIDEO-ID%/sddefault.jpg

Highest resolution

https://img.youtube.com/vi/%VIDEO-ID%/maxresdefault.jpg

All of these are available over https:// as well, just swap out http to https. You can also use the shorthand domain i3.ytimg.com instead of img.youtube.com if you’d like to shorten things up.