Get youtube thumbnail for video

Returns path to youtube video thumbnail by id.

php
fork add to bundle source
function youtube_video_thumbnail( $video, $size = 'hqdefault' ) { # Possible sizes are: # 'default' default size # 'hqdefault' high quality # 'mqdefault' medium quality # 'sddefault' standard quality # 'maxresdefault' maximum quality # return "https://img.youtube.com/vi/{$video}/{$size}.jpg"; }

usage

load_function('youtube_video_thumbnail'); $img = youtube_video_thumbnail('7TF00hJI78Y'); echo $img; // https://img.youtube.com/vi/7TF00hJI78Y/hqdefault.jpg
← how to use this in app?
create log ...inout