13

I'm interested in getting a preview image of a youtube video for my application I'm using the url to the previews:

http://img.youtube.com/vi/EqWRZrupLrI/0.jpg

but this has little two black rows, up and down, and I wish it were bigger. I have read that the 0 is the bigger picture.

anyone know if it is possible to obtain a url with a better image?, for my project, I need the image is on a url

I appreciate the help

Regards :)

Manuel Allenspach
  • 12,467
  • 14
  • 54
  • 76
Sergio76
  • 3,835
  • 16
  • 61
  • 88

3 Answers3

21

0.jpg is the full-size 480p thumbnail and there is no bigger thumbnail except for full HD videos (maxresdefault.jpg).

But why do you expect a bigger thumbnail for such a video ? Your video example has a resolution of 240p, the thumbnail is already much bigger than the video resolution.

zakinster
  • 10,508
  • 1
  • 41
  • 52
7

Each of every image has 4 category like

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 

Also you can get more image size by this

-- For default

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

-- For high quality

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

-- For medium quality

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

-- For max size

https://img.youtube.com/vi/<insert-youtube-video-id-here>/maxresdefault.jpg
pavel
  • 1,603
  • 22
  • 19
3

Please check the following SO post:

How do I get a YouTube video thumbnail from the YouTube API?

YouTube thumbnail link doesn't work in all cases

It will surely solve your problem. I recommend to query the youtube api to get the thumbnail with max resolution.

Community
  • 1
  • 1
biztiger
  • 1,447
  • 4
  • 23
  • 40
  • This **is** the YouTube API for getting video thumbnail or at least it is the only documented way in the Google YouTube API v2. – zakinster Apr 25 '13 at 19:04
  • I don't get what are you suggesting in this comment. For this particular video, 0.jpg is the max thumbnail. But it can change on high res video. – biztiger Apr 25 '13 at 19:21
  • To explain my first comment, you recommended the OP to query the youtube API in order to get the thumbnail max resolution but I was just pointing out that it was precisely what he was doing, unless you know of any other API to get the video thumbnail. – zakinster Apr 25 '13 at 19:46
  • He never mentioned that he is using API. He is using the thumbnail in the format of http://img.youtube.com/vi//0.jpg. However, a video may have bigger image than that. So, relying on youtube data api is the best way. – biztiger Apr 25 '13 at 20:10