How to Get YouTube Video Image Thumbnails

How to get your youtube video image thumbs. Use this in your project when you need the image thumb generated by Youtube in your projects.

In order to get the video thumbnails that YouTube generates we can use the following links.<insert-youtube-video-id-here>/0.jpg<insert-youtube-video-id-here>/1.jpg<insert-youtube-video-id-here>/2.jpg<insert-youtube-video-id-here>/3.jpg

These are high resolutions, medium quality, standard definition, and maximum resolution.<insert-youtube-video-id-here>/default.jpg //normal resolution<insert-youtube-video-id-here>/hqdefault.jpg //high quality resolution<insert-youtube-video-id-here>/mqdefault.jpg //medium quality resolution<insert-youtube-video-id-here>/sddefault.jpg //standard definition<insert-youtube-video-id-here>/maxresdefault.jpg //maximum resolution

To get the YouTube Video ID you can just retrieve the link. For Example:
The ID of the Video is: hfjNjOOB6Sk

This is the PHP script that i use to get the ID of the video

$videoThumb = str_replace(array('', ''), '', $videos['url']);