21.08.2009

YouTube New LogoI have received a request from someone that wants even more from my WordPress Custom Fields Plugin. He has a category called “videos” which has posts with YouTube videos embedded with some plugin. He wants to put the videos thumbnail as the post’s thumbnail.

First, how is the video embedded in the post? It uses the following syntax:
[youtube $video_key]

Now you can embed it like you would normally do.

Second, how do we get the thumbnail itself after we extracted the video key? We build the image’s URL with the following syntax:
http://i2.ytimg.com/vi/$video_key/default.jpg

Now, how do we put all of this together into a plugin that inserts the thumbnails?
You don’t have to because I have already done it for you.

This plugin runs through the posts in your blog and if it finds a YouTube video embedded in a post it sets the thumbnail to be the video’s thumbnail.
That’s it, have fun playing with the configuration.

If you encounter any issues please comment/contact me.

Related posts

Comments

  1. Praz (4 comments) on 08.21.2009

    Thanks Oren. thats wonderful. it was me who requested you to come up with this plugin.

    thanks once again. I guess this plugin will help many people who have got problem with youtube thumbnails.

    rgds,
    Praz.

  2. survivor (1 comments) on 10.01.2009

    Hi, this plugin is just perfect for me, but i have one problem with it. My code for youtube video is:

    [youtube] ID [/youtube] (without spaces)

    for example:

    [youtube]j4QJtW4pgOg[/youtube]

    Can u please help me modify your plugin for use with this?

    Thank You

    John

  3. Kyle (1 comments) on 12.22.2009

    Thanks for the thumbnailer. However, do you have an example for generating a thumbnail from a standard YouTube embed code?

  4. resimler (1 comments) on 12.23.2009

    thansk alot

  5. Sinema izle (1 comments) on 12.23.2009

    Thanks for the thumbnailer..

  6. Denizli Web Tasarım (1 comments) on 12.23.2009

    Thanks. Good thumbnailer.

  7. Paul OFlaherty (1 comments) on 12.28.2009

    Thanks for an awesome plugin. Just like Kyle above, it would be great if you could show an example of the code using a standard YouTube URL.

    Thanks :)

  8. ProjectMatt (1 comments) on 01.01.2010

    Having the same problem as Kyle and Paul. I can’t seem to get the [youtube $video_key] part to work on my blog. I replace the “video_key{ part with the video’s ID, but that doesn’t seem to work.

  9. andrew (2 comments) on 01.02.2010

    can it work with a set up like:
    [youtube width="400" height="300"]eBGIQ7ZuuiU[/youtube]

  10. andrew (2 comments) on 01.02.2010

    Praz, it seems like you got it how work on your site. How did you do it?

  11. Oren Yomtov (55 comments) on 01.11.2010

    Sorry for the delay.

    The new release should fix your problems:
    http://orenyomtov.com/youtube-thumbnailer-plugin-should-now-actually-work.html

    Let me know if it doesn’t.

Leave a Reply





אורן יומטוב