Removing black borders on youtube thumbnails

YouTube offers images that don’t have the 4:3 ratio black strips. To get a 16:9 video thumbnail with no black strips, try one of these:<insert-youtube-video-id-here>/mqdefault.jpg<insert-youtube-video-id-here>/maxresdefault.jpg

For other YouTube thumbnail option you can use following.<insert-youtube-video-id-here>/3.jpg


Get Video ID in WordPress

$video_link = get_field(‘youtube_video’,get_the_ID()); 

if (preg_match(‘%(?:youtube(?:-nocookie)?.com/(?:[^/]+/.+/|(?:v|e(?:mbed)?)/|.*[?&]v=)|[^”&?/ ]{11})%i’, $video_link, $match)){
    $video_id = $match[1];


Developer, Technology aficionado, Beer Lover and founder of Network. Who shares a keen interest about website development, health issues, cancer awareness and other fun stuff.

Add comment

Follow us

Don't be shy, get in touch. We love meeting interesting people and making new friends.

Most popular

Most discussed