2

Using the YouTube iframe API to embed YouTube videos into our website, if the iframe is too small (anything smaller than 270px by 156px or so) the iframe does not use a high definition thumbnail. It works fine for any larger iframes.

The thumbnail is available, but when the YouTube API requests it, it simply requests /i1.ytimg.com/vi/<Video Id>/default.jpg instead of //i1.ytimg.com/vi/<Video Id>/hqdefault.jpg.

Is there anyway to force the thumbnail to be the high definition one?

Here is a link to a website with three embedded YouTube videos all generated using the same code but different dimensions. The two on the left do not request a high quality thumbnail, the one on the right does.

http://pub-dev.lucidpress.com/ef93fe08-3740-4c22-b47a-04483d8ed35b/

gfullam
  • 11,531
  • 5
  • 50
  • 64
Jared Yarn
  • 21
  • 1
  • Welcome, @Jared. For posterity's sake, it would be good if you can include your code example as an embedded code snippet instead of linking to it. If your link changes in the future, this post will be missing the code examples. – gfullam Dec 14 '15 at 21:20
  • You can check out this [SO ticket](http://stackoverflow.com/questions/27072718/how-to-force-high-quality-thumbnails-for-youtube-player-api-iframe-embeds) that may deal with the same issue as yours. – adjuremods Dec 18 '15 at 07:32

0 Answers0