Getting YouTube Preview Image
<?php function get_youtube_preview_image( $url ) { $vars = array(); parse_str( parse_url( $url, PHP_URL_QUERY ), $vars ); return 'https://img.youtube.com/vi/'.$vars['v'].'/hqdefault.jpg'; }