Grab youtube thumbnail images

Youtube has made it very easy comparing to others when it comes to grabbing thumbnail images for you to use as preview images in your custom video application or other. This is how the URL for youtube thumbnails looks like:

Replace _YOUTUBE_ID_ with the ID of the video.
Replace _IMAGE_NR_ with a number 1-3 to get different thumbnails for the video in size 120x90px.

For a big thumbnail use 0.jpg

Take the following video as an example:

In this example _YOUTUBE_ID_ is equal to _OBlgSz8sSM

So, here’s our code for small thumbnail #1 (120×90):


This is small thumbnail #2 (120×90):


Sall thumbnail #3 (120×90):


Big thumbnail (480×360):