Is there a way to show an image of a youtube video instead of the actual player ? This would be done only for the teaser view of the node.

I know that I can show a video thumbnail, but I need an image that looks like the actual player.


2 Answers 2


If you can grab the id of youtube video then you can use following pattern of url to get a bigger youtube thumbnail.

http://img.youtube.com/vi/[your video id]/0.jpg


This would require a little work on your behalf to write a small module to get the youtube thumbnail and then process it.

For example if you use Embedded Media Field with Media: Youtube then you can get the URL with $node->field_emvideo[0]['data']['thumbnail']['url'] (*field_emvideo* is the name of your field) and use it with ImageCache Actions to add a background image which would be the Youtube player.

I don't have a full code to offer but using ImageCache API (see the code snippet at the bottom) is quite simple, ex:

 print theme('imagecache', $preset, $image['filepath'], $alt, $title,  $attributes); 

Good luck ;)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.