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.

http://img.youtube.com/vi/%VIDEO-ID%/0.jpg
http://img.youtube.com/vi/%VIDEO-ID%/1.jpg
http://img.youtube.com/vi/%VIDEO-ID%/2.jpg
http://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

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

High quality

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

Medium quality

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

Standard definition

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

Highest resolution

http://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.

Meet the Author

Kevin Leary, Boston WordPress Developer of 10 Years

I'm a freelance web developer and WordPress consultant in Boston, MA with 13 years of experience building websites and applications. View a portfolio of my work or request an estimate for your next project.