#84483Respect alternative fallback for 16:9 youtube preview image
Description
Scenario:
User add a youtube video via file list. Example: https://www.youtube.com/watch?v=ew6_lYiGWo4
Current state:
The YouTubeHelper get the preview image via “maxresdefault.jpg” (16:9 or 1280×720) If this image isn’t available (404 code) the fallback is the 0.jpg (4:3 or 480×360) But maxresimage isn’t available for all videos “ This image size is available for some videos and other resources that refer to videos, like playlist items or search results.”
Possible workaround:
To respect another 16:9 format source, we could add another fallback before “0.jpg”: “mqdefault.jpg” (320×180)
- Video MaxRes Image: https://img.youtube.com/vi/ew6_lYiGWo4/maxresdefault.jpg
- Video Medium Image: https://img.youtube.com/vi/ew6_lYiGWo4/mqdefault.jpg
- Video Default Image: https://img.youtube.com/vi/ew6_lYiGWo4/0.jpg
- YouTube Doc: https://developers.google.com/youtube/v3/docs/thumbnails
Further discussion:
https://stackoverflow.com/questions/34763547/youtube-maxresdefault-thumbnails
Releases: master, 8.7