How to get thumbnail image from YouTube videos?
Hello, guys! I hope you will like this post. In this post, I am going to tell you how to get the thumbnail image of any YouTube video.
YouTube automatically generate 4 types of the thumbnail image. You will able to get each thumbnail image from these URL given below:
The first URL which ends with 0.jpg will load the full-size image and all the other URLs (1.jpg, 2.jpg, 3.jpg) will load thumbnail with different size.
If you want to get thumbnail which is not automatically generated by YouTube and uploaded by the uploader then the above URLs will not work. You just need to change the URL structure. Below is the given URLs:
To load the default quality thumbnail use the URL similar to this:
To load the high-quality version of the thumbnail use an URL similar to this:
You can also load a medium quality version of the thumbnail for particular YouTube video, using an URL similar to:
The below URL will load the standard definition of the thumbnail:
To load the maximum resolution version of the thumbnail use an URL similar to this:
In all of the above image URL, you have to put the video id by replacing YouTube_Video_ID. You will easily get the ID for each youtube video from the Video URL. For example:
The red part of the above URL is the YouTube video id for that particular YouTube video. With this way, you will able to get video id for any YouTube video.
At the end, I want to inform you that you can use
i3.ytimg.com works in place of
and it is also available over http.