This is an in-case-you-didn’t-already-know tip, and is probably common knowledge to anyone who started writing YouTube scripts after v3 of the YouTube API came out. The gist is that in addition to the tiny thumbnail images that have always been available at a url containing the video id, you can also get a range of qualities and sizes.
Here’s an example url that will grab the largest image size available for video id
The quality/size is specified in the name of the requested JPG. Other options include:
default.jpg(120x90 pixel default thumbnail)
3.jpg(small start, middle, and end frame thumbnails)
The default thumbnail can be set on your own videos using the video dashboard in YouTube. For other people’s videos, all of the above options will return whatever they’ve set or YouTube has chosen automatically. I haven’t seen an option to get higher quality versions of the 0-3 frames.
Note that the
mqdefault.jpg options do not have letterboxing (black stripes at top and bottom) added, but
maxresdefault.jpg a while ago. I’d love to find an option to load @1x and @2x sizes based on screen resolution detection, but for now it’s max quality or bad quality.