Skip to content

May 27, 2014

Thumbnails from YouTube

Thumbnails from YouTube

One of really easy things is a getting of thumbnails from YouTube! No ajax requests, no getting any JSON, just simple, plain links!

Suppose you have the YouTube video like this:

It has the URL: // with this specific ID: 47dtFZ8CFo8.

Now, you want to get a thumbnail for this video somewhere on a different page. Or maybe you want to have just a list of thumbnails of other YouTube videos below this one.

How to get thumbnails?

It’s not a big deal, thanks to the Google!
Just put the <img> tag with the URL formatted in this way:
as you can see in this URL presents the same unique ID, as it is in URL of actual video: 47dtFZ8CFo8

and you will get the first one of the 3 automatically generated thumbnails using the number 1 in the name of a thumbnail:

As I know we can have 3 thumbnails, let’s try to get all these three thumbs:

Cool, it works!

So if you want to get a thumbnail from YouTube, just use such URL for this image: