An application I'm working on needs to get HQ YouTube thumbnails given a URL. Using this answer, I tried using the maxresdefault.jpg
to get the maximum resolution of the thumbnail but on some videos (seemingly random), the request 404's.
Here are some examples:
- http://img.youtube.com/vi/zIez5QVE3NI/maxresdefault.jpg works
- http://img.youtube.com/vi/DaAfe5xTm8w/maxresdefault.jpg doesn't work
Using the same URL's, other requests using the same video keys do work:
- http://img.youtube.com/vi/zIez5QVE3NI/default.jpg works
- http://img.youtube.com/vi/DaAfe5xTm8w/default.jpg works
Why doesn't maxresdefault.jpg
reliably return the image? Both of those videos are public and can be embedded.
I'd use 0.jpg
but it has black bars on the top and bottom of the image.