Youtube Video Thumbnail URLS

Sam Deering

The YouTube documentation is shambles so here is a quick reference of how you do this and what it means. This post follows on from an earlier post on how to display YouTube Video thumbs using jQuery.

The first one in the list is a full size image and others are thumbnail images.


http://img.youtube.com/vi/dXo0LextZTU/0.jpg


http://img.youtube.com/vi/dXo0LextZTU/1.jpg


http://img.youtube.com/vi/dXo0LextZTU/2.jpg


http://img.youtube.com/vi/dXo0LextZTU/3.jpg

http://img.youtube.com/vi/dXo0LextZTU/0.jpg

http://img.youtube.com/vi/dXo0LextZTU/1.jpg

http://img.youtube.com/vi/dXo0LextZTU/2.jpg

http://img.youtube.com/vi/dXo0LextZTU/3.jpg

There os also high quality, medium quality and standard definition version of the thumbnails.


http://img.youtube.com/vi/dXo0LextZTU/default.jpg


http://img.youtube.com/vi/dXo0LextZTU/hqdefault.jpg


http://img.youtube.com/vi/dXo0LextZTU/mqdefault.jpg


http://img.youtube.com/vi/dXo0LextZTU/sddefault.jpg

http://img.youtube.com/vi/dXo0LextZTU/default.jpg

http://img.youtube.com/vi/dXo0LextZTU/hqdefault.jpg

http://img.youtube.com/vi/dXo0LextZTU/mqdefault.jpg

http://img.youtube.com/vi/dXo0LextZTU/sddefault.jpg

* default – The default thumbnail image. The default thumbnail for a video – or a resource that refers to a video, such as a playlist item or search result – is 120px wide and 90px tall. The default thumbnail for a channel is 88px wide and 88px tall.
* 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.
* 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.

More Info

You don’t need an API key to use this service.

All of the above urls are available over https too. Just change http to https in any of the above urls. Additionally, the slightly shorter hostname i3.ytimg.com works in place of img.youtube.com in the example urls above.

Code Examples

JS – https://code.google.com/p/youtube-api-samples/source/browse/#git%2Fsamples%2Fjavascript
PHP – https://code.google.com/p/youtube-api-samples/source/browse/samples/php/upload_thumbnail.php

Source

https://developers.google.com/youtube/v3/docs/videos#snippet.thumbnails.%28key%29
http://stackoverflow.com/questions/2068344/how-to-get-thumbnail-of-youtube-video-link-using-youtube-api

Free book: Jump Start HTML5 Basics

Grab a free copy of one our latest ebooks! Packed with hints and tips on HTML5's most powerful new features.

No Reader comments

Comments on this post are closed.