Sunday , 26 March 2017
Home » Technology » Development » How to get the URL of the various sizes of YouTube Thumbnail Image

How to get the URL of the various sizes of YouTube Thumbnail Image

As you know, recently I’ve updated my blog and started using featured images. However, my theme doesn’t grab the image from YouTube if a video is shown as my feature instead. I’ll have to do this manually and download the images by myself and set the featured image. So here are the links!

Each YouTube video has 4 generated images. The first is a full size cover image and the rest are thumbnail images:
480x360: http://img.youtube.com/vi/<insert-youtube-video-id-here>/0.jpg
120x90 : http://img.youtube.com/vi/<insert-youtube-video-id-here>/1.jpg
120x90 : http://img.youtube.com/vi/<insert-youtube-video-id-here>/2.jpg
120x90 : http://img.youtube.com/vi/<insert-youtube-video-id-here>/3.jpg

The default thumbnail image (ie. one of 0.jpg, 1.jpg, 2.jpg, 3.jpg) is:
120x90 : http://img.youtube.com/vi/<insert-youtube-video-id-here>/default.jpg
For the high quality version and medium quality version of the thumbnail:
480x360: http://img.youtube.com/vi/<insert-youtube-video-id-here>/hqdefault.jpg
320x180: http://img.youtube.com/vi/<insert-youtube-video-id-here>/mqdefault.jpg

For the maximum resolution version of the thumbnail, the size depends on the video quality:
http://img.youtube.com/vi/<insert-youtube-video-id-here>/maxresdefault.jpg
All of the above urls are available over https too. Just change http to https in any of the above urls.

Alternatively, you can use the YouTube API to get thumbnail images.

In the meantime, enjoy the youtube video about “Enabling video uploads for your WordPress blog

About Justin Lee

Check Also

Apple WWDC 2014 Videos Podcast RSS Feed Generator using XSLT

I realised there isn’t any podcast subscription link for the Apple WWDC 2014 videos at …

Leave a Reply