jcadima
8/26/2015 - 3:58 AM

get YouTube thumbnail from Video ID

get YouTube thumbnail from Video ID


http://stackoverflow.com/questions/2068344/how-do-i-get-a-youtube-video-thumbnail-from-the-youtube-api



For the standard definition version of the thumbnail, use a url similar to this:

http://img.youtube.com/vi/<insert-youtube-video-id-here>/sddefault.jpg


ex: http://img.youtube.com/vi/JZd7XH6-_Es/sddefault.jpg

video ID: JZd7XH6-_Es


YOUTUBE GET SMALL THUMBNAILS 
http://i1.ytimg.com/vi/j0YOXVlPUu4/default.jpg
where j0YOXVlPUu4  is the id of the youtube video

on custom fields:
<img src="http://i1.ytimg.com/vi/<?php the_field('youtube_video_url') ;  ?>/default.jpg">