The Relax Code Code Example Tools Article About

How to get the thumbnail of a YouTube video

The video ID is the unique identifier for a YouTube video. It’s the part of the URL after ?v=. For example, in https://www.youtube.com/watch?v=owg6zxJqJFw, the video ID is owg6zxJqJFw.

Use the video ID in one of the following URL formats to get the different sizes of the thumbnail:

Default Thumbnail (120x90 pixels)

https://img.youtube.com/vi/VIDEO_ID/default.jpg

Example:
https://img.youtube.com/vi/owg6zxJqJFw/default.jpg

Result:

Medium Quality Thumbnail (320x180 pixels)

https://img.youtube.com/vi/VIDEO_ID/mqdefault.jpg

Example:

https://img.youtube.com/vi/owg6zxJqJFw/mqdefault.jpg

Result:

High Quality Thumbnail (480x360 pixels)

https://img.youtube.com/vi/VIDEO_ID/hqdefault.jpg

Example:

https://img.youtube.com/vi/owg6zxJqJFw/hqdefault.jpg

Result:

Standard Definition Thumbnail (640x480 pixels)

https://img.youtube.com/vi/VIDEO_ID/sddefault.jpg

Example:

https://img.youtube.com/vi/owg6zxJqJFw/sddefault.jpg

Result: