YouTube takes screenshots of the videos you upload. Here is a quick reference of how you do this on your webpage. Each YouTube video has 4 generated images. The first is a full size cover image and the rest are thumbnail images:
The default thumbnail image (i.e. one of 0.jpg, 1.jpg, 2.jpg, 3.jpg) is:
For the high quality version and medium quality version of the thumbnail:
For the maximum resolution version of the thumbnail, the size depends on the video quality:
All of the above urls are available over https too. Just change http to https in any of the above urls.
Alternatively, you can use the YouTube API to get thumbnail images.
Happy Coding 🙂