Last active
December 15, 2015 08:39
-
-
Save benplum/5232997 to your computer and use it in GitHub Desktop.
Return YouTube thumbnail URL.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
default.jpg | |
mqdefault.jpg | |
hqdefault.jpg | |
maxresdefault.jpg | |
0.jpg - 3.jpg | |
*/ | |
function youTubeThumbnail($id, $size = "mqdefault") { | |
return "http://img.youtube.com/vi/" . $id . "/" . $size . ".jpg"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment