thumbnail from youtube video code example

Example 1: youtube video image

<!-- thumbnail -->
https://img.youtube.com/vi/<insert-youtube-video-id-here>/mqdefault.jpg

<!-- Others -->
https://img.youtube.com/vi/<insert-youtube-video-id-here>/default.jpg
https://img.youtube.com/vi/<insert-youtube-video-id-here>/0.jpg
https://img.youtube.com/vi/<insert-youtube-video-id-here>/1.jpg
https://img.youtube.com/vi/<insert-youtube-video-id-here>/2.jpg
https://img.youtube.com/vi/<insert-youtube-video-id-here>/3.jpg

Example 2: video tag thumbnail

<video controls poster="/images/w3html5.gif">
  <source src="movie.mp4" type="video/mp4">
  <source src="movie.ogg" type="video/ogg">
  Your browser does not support the video tag.
</video>

Example 3: thumbnail video in html

<!DOCTYPE html>
<html lang=en>

<head>
<title>Alison falling out of bed on Medium</title>
</head>

<body>

<h1>Alison falling out of bed on Medium</h1>

<video poster="PreviewImage.jpeg" width="640" height="480" controls="controls">
  <source src="AlisonFallingOutOfBed.webm" type="video/webm" />
  <source src="AlisonFallingOutOfBed.mp4" type="video/mp4" />
  <source src="AlisonFallingOutOfBed.theora.ogv" type="video/ogg" />
  Bummer, your  browser does not support the video tag.
</video>

</body>
</html>

Tags: