hereHere is a simple function iI created for getting the thumbnails, it. It is easy to understand and use. $link
$link is the youtubeYouTube link copied exactly as it is onin the browser , for example, https://www.youtube.com/watch?v=BQ0mxQXmLsk
function get_youtube_thumb($link){
$new=str_replace$new = str_replace('https://www.youtube.com/watch?v=', '', $link);
$thumbnail='https$thumbnail = 'https://img.youtube.com/vi/' . $new . '/0.jpg';
return $thumbnail;
}