You are here

function asset_embed_youtube_thumbnail_src in Asset 6

Same name and namespace in other branches
  1. 5 asset_embed/providers/youtube.inc \asset_embed_youtube_thumbnail_src()
1 call to asset_embed_youtube_thumbnail_src()
theme_asset_embed_youtube_thumbnail in asset_embed/providers/youtube.inc

File

asset_embed/providers/youtube.inc, line 25

Code

function asset_embed_youtube_thumbnail_src($asset, $attr = array()) {
  $id = $asset->embed['id'];
  $img = $attr['thumbnail'] ? $attr['thumbnail'] : 'default';
  $url = "http://img.youtube.com/vi/{$id}/{$img}.jpg";
  return $url;
}