WordPress Video Thumbnails
I’m finally releasing my first WordPress plugin, and it’s something that I hope a lot of people will actually find useful.
Video Thumbnails makes it easy to automatically display video thumbnails in your template. This plugin can pull the thumbnail for you, save it to your media library, and set it as the featured image.
Video Thumbnails currently supports these video services:
- YouTube
- Vimeo
- Justin.tv
- Blip.tv
- Dailymotion
- Metacafe
For FAQs, advanced functions for theme developers, and more information, check out Video Thumbnails on the WordPress Plugin Directory.
Download latest version
You can download Video Thumbnails 1.8.1 here or straight from your WordPress installation by searching for “Video Thumbnails.”
Appreciate Video Thumbnails?
Say thanks by rating Video Thumbnails on the WordPress Plugin Directory, by buying me something from Amazon, or using the PayPal button below.
Support
Find a bug? Need some help? Please use the WordPress Forums – it’s more organized than the comments and it might help someone else having trouble! Be sure to include as much info as possible about your WordPress version, plugin version, theme, server/host, etc.
Follow @VideoThumbnails to get the latest development news.


Nice plugin!
some tips / feature requests to make it the best video thumbnail plugin ever.
a get_video_thumbnail() function to get the value in php
and a feature like:
if(video_thumbnail()) video_thumbnail();
instead of displaying a default img.
anyway, nice one anyway!
Thanks! Adding get_video_thumbnail() should be really easy, so I’ll probably have an update for it sometime today. The if(video_thumbnail()) video_thumbnail(); idea shouldn’t be hard to do either, but I’ll be giving it some thought to find the most efficient way of doing it, and maybe I’ll have that today too.
You rock!
Hej Sutherland,
great initiativ with the plugin. Saves alot of work. Are you planning on worling more on it? I was thinking of getting rid of the black bars. Furthermore the vimeo thumbnail wont work for me. Do i use the standard iframe(html) embed code of vimeo? Greetings from denmark.
Thanks Mario,
I have a lot of improvements planned for this plugin. I personally need this type of plugin, so development will definitely be a continuous process.
The black bars are an unfortunate side effect of the way YouTube creates their thumbnails on widescreen videos. Hopefully they will change this one day, but for now a way to fix this is to use timthumb. Timthumb can resize and crop the image to widescreen dimensions along with storing a locally cached version. I’m planning on eventually having the plugin automatically store a local copy of the image.
Can you send me an example of a page where a Vimeo thumbnail isn’t working?
Just checked out your site and found the Vimeo iframe embed code you mentioned. I had never seen it before but should be able to add support very soon.
that was soon! thanks.
Hej Sutherland, i use a plugin that makes it easy to embed html vimeo videos(http://blog.esimplestudios.com/2010/08/embedding-vimeo-videos-in-wordpress/) so in my post body i just enter a shortcode like:([vimeo clip_id="15800608"]) Maybe some other people also use that plugin, it has good ratings. Would you modify the plugin to look for that shortcode aswell?
Support has been added! Let me know if you run into any issues
I’m new to WordPress!
Can someone explain step by step how to do/ use this?
I activated the plugin and added <img src=”" alt=”YOUR_ALT_TEXT” /> to my template’s loop php.
Doesn’t do much :-)
Thanks
Hmm, I assume WordPress removed the php from your comment, but I have a couple of things I’d assume might be the real problem.
If you’re using the default twentyten theme, be sure you have the line in the appropriate section of the loop.php file. I know it contains a few different loops within the file.
Since you’re new to WordPress I’ll also go ahead and give you a more complete code to use. Try using this and make sure it’s in the section of loop.php under /* How to display all other posts. */:
<img src=”<?php video_thumbnail(); ?>” alt=”<?php the_title(); ?>” width=”200″ />
you were right!
It works.
Copyd the file to “how to display all other posts” and it does the job.
Thanks a lot
Here the same issue with Vimeo thumbs:
http://www.lowriderscollective.com
The site uses your plugin if there is no featured image or if there’s no image uploaded with a post. The blank ones are the vimeo thumbs. :-/
Hey Jonas! any pointers to how you got the vimeo to play directly in the gallery post instead of loading a new page?
Would help me a LOT…
:-)
[...] thumbnails in the user back-end, but even that process was a bit tedious. Until I discovered the WordPress Video Thumbnails plugin from Sutherland Boswell. It’s fairly easy to set up [...]
Thanks for including support for my plugin, I am gonna try this on my own blog :)
No problem! Glad someone requested I add it
Will this plugin create a resident image from youtube or vimeo vid for use as a thumbnail for excerpts? My studiopress theme can only use resident images (e.g., stored in WP dashboard>media>library) to create thumbnails for excerpts.
At the moment it requires modifying your theme to implement this plugin, which gives more flexibility to developers who want to use it but unfortunately means it can be harder to implement. There should be a way to work this into the theme’s loop to use a video thumbnail if no featured image is found. I’d be happy to help if you’d like to give it a shot.
This project is only about 2 weeks old, so if you can’t figure it out right now check back again and hopefully I’ll have media library integration.
Hey Sutherland
Love the plugin but was wondering if there was any way to get it to easily work with the Simple Video Embedder plugin: http://wordpress.org/extend/plugins/simple-video-embedder/
My clients currently use that plugin but it does not insert the video into the post therefore I cant use your plugin properly.
Do you know if there is any way to get it to automatically pull the thumbnail from an attached video?
Am willing to do some hacking if need be
Thanks
Andy
Hey Andy,
I think I know a way to add compatibility, but I’m gonna have to take a closer look at the plugin. Even if I don’t add official support right away, I think I know how you can get it working.
Good news! Seem to have a working update already, I’ll post either tonight or tomorrow after I do a little more testing.
No thumbnails from blip.tv. Am I doing something wrong?
Right now Blip.tv support is limited to any type of embedding that uses the URL of the video page on blip.tv. This includes the automatic embedding feature included in WordPress or any plugin like Viper’s Video Quicktags. The standard embed code provided by blip.tv was giving me some headaches so I haven’t supported it yet. If you email me a sample of your embed code I’d be happy to get it working.
Hi Sutherland,
This is just what I’m looking for thanks, Im a bit of a newbie here and Im using thesis theme.. how can I add it to loop? I dont seem to have a loop.php i already activated the plugin.. thanks in advance!
Hey Phil! Glad to see you’re giving my plugin a shot. The loop is what the portion of code that generates a list of posts is called. It just repeats whatever the layout needs for each post being displayed on a page. You’ll have to make a slight modification to your theme, so look around in the template’s files (index.php may be what you need to look in) for
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>– this marks the beginning of a loop.Now you’ll want to place
<img src=”<?php video_thumbnail(); ?>” alt=”<?php the_title(); ?>” width=”200″ />in the place you’d like to display a thumbnail. You can learn more about the loop here.
If you need any more help, don’t hesitate to email me.
Love it…! :D
This is a fantastic plugin, just what I need.
However, it works fine with YouTube videos, but doesn’t with Vimeo videos.
I’m using the “Vimeo Quicktags” plugin to insert Vimeo videos into my posts/pages, which uses iframe. The code on the page with the video looks like this:
Any suggestions why it’s not grabbing a thumbnail? Many thanks.
Ok I fixed my problem. My plugin was using the shortcode [vimeo video_id...] so I changed line 123 in your video-thumbnails.php from:
“preg_match(‘#\[vimeo clip_id=…”
to
“preg_match(‘#\[vimeo video_id=…”
Thanks for pointing this out, I’ll add support so you don’t have to worry about future updates breaking it again.
Thanks very much :-)
On a different note, do you have any suggestions how I can control the aspect ratio of the thumbnail image?
I’m re-sizing the thumbnails to suit my theme (using <img src="” height=”161px” width=”161px” >) but this causes the image to look squashed!
If I remove the height and width attributes, and define each thumbnail size in my stylesheet, then I get the right size thumbnail, but of course most of the image is cut off.
Any suggestions are welcome.
If you only define width or only define height it should keep the correct ratio in most browsers, but I think the best solution is to use timthumb.
Absolutely fantastic, timthumb done the job. Many thanks.
Very grateful for this plugin. (Except for having to touch/even look at code) it’s exactly what I’ve been looking for.
Now, I don’t want to get ahead of myself. I’m still developing this damn site, but it seems this may just do the trick that I’ve spent two days trying to do. Bravo, eager for updates, thanks for the good work.
Thanks for the kind words! I understand that it’d be nice to be able to activate without modifying your theme, so I’m looking into some options for future versions. The difficulty comes in making sure the solution works with the majority of themes. Likely it will be a fallback for themes compatible with featured images when there is none.
Okay, so here’s what I’m trying to sort out:
I believe this pluging will set the video thumbnail as the wordpress “featured image” if nothing else is selected. But I can’t seem to get it to do that automatically.
Now, somehow, god knows, it did it once, for one of my posts, as I was playing around entering the php within my loop. But not for any other posts.
Meanwhile, being very code wary, I don’t really understand where/if I need to put this in the loop? I saw the “how to display all…” advice for the basic wordpress theme but I can’t find that in the custom theme I’m using.
Any ideas?
Hello
your plugin works just fine by making that little modification in the loop of the index.php page.
But it does not replace the video itself. It just shows the thumbnail on top of the video. What should I do not to show the video in my homepage posts?
Any suggestion please, thank you.
The plugin is designed for use in situations where you aren’t showing the full post. Your first option is to replace
the_content()withthe_excerpt(). Another option is to use the<!--more-->tag in your post to create a break point in the post, and place the video after that point. This info might help.I have the same problem. I include the video thumb on the homepage and use the
<!--more-->in the posts. now I get the video thumbnail and a picture form the post.It sounds like your theme is using the WordPress featured image function. Remove the video thumbnail function you’ve added, then look for the_post_thumbnail() in the code, and replace it with
if(get_video_thumbnail()!=null) { echo '<img src="'.get_video_thumbnail().'" class="video-thumbnail" />'; } elseif(has_post_thumbnail()) { the_post_thumbnail(); };If you need any more help, just email me your template file and I’ll take a look.
Hi Sutherland. When I try to add any of the functions listed in the plugin FAQ, I get the following error. Any ideas for me? Thanks!
Fatal error: Call to undefined function curl_init() in \video-thumbnails.php line 98.
It sounds like your server doesn’t have curl installed, I’ll see what I can do.
You nailed it on the head. I enabled it in my php.ini and it worked. Thanks!
Hi there,
I installed and activated this plug-in but it did not create automatic thumbnails for the existing video posts.
I went in and added the “More” tag into each post (because I read on your forum somewhere that these thumbnails are for EXCERPTS (correct??) and when I UPDATE the plug-in DID then insert the thumbnail into the Video Thumbnail box on the Post edit page.
There is ALSO an image displaying in the “Featured Images” box on the Post Edit page. Is this supposed to happen??
However, there are no thumbnails displaying on the blog page. They are all full-size images.
I’ve searched my index.php file and do not see where I can insert the code to re-size the display of the images.
I don’t know what I’m doing wrong and I’m not a code expert.
I hope I’ve given you enough info to help me. I’d love to be able to display these videos as thumbnails, automatically, as this is a video blog my first such blog).
thanks very much!
Hey there! Glad you’ve found my plugin.
The plugin only runs when a post is saved or updated, or if you’re using one of the template tags it creates. I’m currently working on adding a feature to scan all posts for thumbnails, but it’s taking a little while to get it to run smoothly on very large sites.
The image appears again in the “Featured Images” box because many themes use this feature to display a thumbnail for the post. If your theme is using this feature, you might not need to make any modifications to your template. If you don’t need this feature, you can always disable it on the Video Thumbnails settings page.
Because every theme is different, I’m not really sure where to tell you to look in your code without a little more information about the theme you’re using. You can contact me directly if you need any more help.
Just wanted to say great work on this plugin! Looking forward to following the progress!
Hi dude, I am using your plugin for a couple of months and it is very suitable for me. But recenlty, I am urgently need to generate the thumbnail for dailymotion’s & metacafe’s videos. I don’t know if there any enhancement plan catering for these two video sites. If not, i am willing to pay you some for this. Please let me know your thinking and contact me at mobaobao@gmail.com.
Thank you,
Stanley
I think I should be able to add both, but it might be a few days. You can always check out my Amazon wish list if you’d like to contribute.
Hi, great plugin !
By any chance do you know if there is an equivalent to automatically set the first uploaded image as featured image ? Is it possible that I’m the only one needing this?
Best regards,
Yasy
I’ve thought that there should be a plugin to do it, but I’ve never looked. If there isn’t one maybe some day I could get around to it.
That would be great ! please dont hesitate to let me know :)
Hey,
Great plug-in. One question: is there anyway to add a watermark to all the thumbnails it generates? Ideally I’d like to make it clear that the image is a video and not a normal photo.
Thanks
I think the best solution is to have an image overlay using some html and css if you’re comfortable editing your theme. Here’s a live example of this in action.
Add
<?php if(get_video_thumbnail()!=null) echo '<img src="overlay.png" class="overlay" />'; ?>to your template right after the featured image (replacing overlay.png with path to the watermark image) then using CSS you should be able to modify the positioning.If you need some more help, feel free to contact me directly.
Thanks Sutherland,
Ideally I would like to generate the overlay within the plug-in itself when the plug-in creates the thumbnail. Reason is that I’m using the thumbnails as part of a slider that also includes images – any suggestions?
Thanks again,
John
Hi, great plugin!, but i have an issue.
If the video embed codes are in a custom field, What should I do to make the plugin to detect it?
I’m looking into eventually adding support for custom fields in the settings, but for now you should be able to make a small edit to get the job done. Try replacing these lines:
// Gets the post's content$post_array = get_post($post_id);
$markup = $post_array->post_content;
$markup = apply_filters('the_content',$markup);
$new_thumbnail = null;
with:
// Gets the post's content$video_key = 'your_key_name_goes_here';
$markup = get_post_meta($post_id, $video_key, true);
$new_thumbnail = null;
Hmmm the short code are visible in the initial post…
Have a look :
http://mentalindustries.com/boe_wp/
Try disabling Video Thumbnails and see if it’s still happening… I don’t think it’s related to VT.
No matter what i do, the alt tags arent registering as an attribute on websitegrader.com or any other seo analyzer site ‘alt=”"‘ shows the alt text in the source, but it’s not registering as alt text for some reason
Also, I can’t have this crop and resize instead of resizing the full version. Can you add crop support or pastebin the function?
I got it.
Here’s my code
<img src="/scripts/timthumb.php?src=&q=100&a=t&h=142&w=222" alt="ID, "post-img-alt", true)) ? htmlspecialchars(get_post_meta($post->ID, "post-img-alt", true)) : the_title(); ?>" width="222" height="142" />Just wanted to say thank you for this outstanding plugin. I have nearly a decades worth of posts, hundreds of YouTube videos, that I needed to have WordPress post thumbnails set for (in preparation for a new theme/redesign). This plugin went through them like a knife goes through butter. It’s saved me a tremendous amount of time from having to set all the thumbnails manually.
I have two requests for a future version, one is for JW Player support (probably the most popular embed/Flash player) and the other for TwitVid support. TwitVid seems pretty straightforward to add – the thumbnail location for the video http://www.twitvid.com/NG5SX would be http://images3.twitvid.com/NG5SX.jpg for example.
Anyway, thanks again for this great plugin.
Hi Sutherland,
I’ve been using your plugin for about a month, and I just wanted to take a moment to thank you.
I think it’s a marvelous plugin and it’s an extremely important element in the overall design of my blog.
You can see it’s implementation at http://explainingfacebook.com
Thanks again,
Patrick Batty
[...] Video Thumbnails [...]
tnx for the plugin
You plugin seems helpful, but it doesn’t quite do what I need. I’d like to be able to set the thumbnail to not be the first second of my video, but to be from some other chosen time of the video. The first second isn’t that attention grabbing usually, and I’d rather use a part usually 5 or 10 seconds into the video. Do you know how I would do that? Would that be something that could be added to your plugin?
The thumbnail used is whatever the video service provides, so it’s up to the video uploader to set a better thumbnail if their service allows it.
I understand that, but I was hoping for a way to use videos uploaded directly to WordPress that don’t already have a thumbnail uploaded. So if you already have videos in your media gallery on WordPress, you can insert it into your post and choose a thumbnail at that time. The plugin is still useful to me, but I’m surprised I haven’t been able to find a plugin that will let you make a thumbnail of a self-hosted video that is uploaded directly into WordPress. It’s an annoying extra step to have to make my own thumbnail of the video and upload it as well as the video itself.
This guy (http://www.kylegilman.net/2011/01/18/video-embed-thumbnail-generator-wordpress-plugin/) seems to pretty much have it set up, but I’m not willing to use his plugin as a non-WordPress Directory one.
very good plugin and usefull!
Thanks! Hope you’ll consider donating
great job.. like it :)
thanks
Hi,
First, sorry for my bad english :/
This plugin work’s well ! :)
But ! I need your help.
I have a post with many video.
And i need to create thumb for each video.
How can i do this ?
Thank’s for your help.
The precise functionality I’m looking for is as follows:
A thumbnail that’s clickable. When you click on it, it is replaced with the video, and the video starts playing.
How do you suggest I go about doing this?
Hey Emmanuel, this is something that is requested a lot, but falls outside the scope of this plugin at the moment. I would look to a javascript community for their help (there are plenty of people who would probably come up with a better way than I could) but maybe one day I can write a tutorial for how to add it to a theme.
+1 this feature! I’m looking for play-in-page video thumbs as well and can’t believe that wordpress can’t do it! tumblr can and I’ve been racking my brain trying to reverse engineer and make it work. I can’t :(
Hi, great plugin! Im quite new to wordpress, wondering if you are intending to add support for Ted.com? Any chance i can do that myself? Is that difficult?
I looked around to see if TED has an API, and it looks like they announced plans for one earlier this year. It doesn’t seem to be out yet, but if you keep an eye out and let me know when they release it I’ll probably be able to add support.
Thanks!
You´re the greatest thing since sliced bread with Snickers Spread!
dailymotion seems change the rule so this plugin can’t work for dailymotion any more. Would you please check for it? Thank you very much.
Awesome Plugin!
Only thing missing is support for http://youtu.be/
I’ll keep this in mind for the next update!
I cannot find a description about your plugin that adequately describes what it does. Please tell me if the user clicks on the thumbnail can it play or is it just an image?
It only saves the thumbnail to the media library and makes it the featured image for the post, which works well for themes that use featured images. It’s designed with developers in mind, so more unique functionality like playing the video when clicked would have to be done by a developer.
I do get a lot of requests for this or a lightbox-style player when clicked, so maybe one day I can find the time to put together a plugin that adds this feature.
@Hank, the Tubepress plugin already does what you want. This plugin servers another purpose.
A useful plug-in! I can save a lot of my time.
Awesome plugin, I’ve been searching all day for for a way to display YouTube thumbnails on my home page and you’ve made it so simple, thank you!