Home / Content Marketing / How to Generate a YouTube Thumbnail
YouTube WordPress Plugin

How to Generate a YouTube Thumbnail

A few minutes ago, I was asked, “Is it possible to generate a thumbnail for a YouTube video?”. This could be useful to display thumbnails with links in your sidebar, or to replace the YouTube embed code with a video within your RSS feed. Attempting to write your own YouTube thumbnail generator could be quite a task.

The good news is that you don’t actually have to generate a thumbnail, YouTube actually has several waiting for you:

YouTubeHere’s the video – notice the video id?
http://www.youtube.com/watch?v=SgGVitTU9F8

Here are the images in a couple sizes and frames, note the video id is embedded in the URL:

  • http://img.youtube.com/vi/SgGVitTU9F8/0.jpg
  • http://img.youtube.com/vi/SgGVitTU9F8/1.jpg
  • http://img.youtube.com/vi/SgGVitTU9F8/2.jpg

An easy way to embed the thumbnails in your sidebar would be to enter the image URL manually as a custom field, then customize your theme to display the custom field if it exists.

UPDATE: We have developed a great YouTube thumbnail and player plugin for WordPress. This plugin allows you to just point to your YouTube profile or a playlist and the code retrieves the preview image for you! Be sure to download it and let us know what you think!

Sponsor: Video sponsoring is a low cost, high return marketing technique which if used RIGHT, will do wonders to your current income. Learn how to utilize video sponsoring on YouTube to generate high volumes of relevant traffic to your site.

About Douglas Karr

Douglas Karr is the founder of The Marketing Technology Blog. Doug is the CMO of CircuPress and CEO of DK New Media, an agency specializing in assisting marketing technology companies with their inbound marketing - leveraging social media, blogging, search engine optimization, pay per click and public relations. Their clients include Angie's List, GoDaddy, Mindjet and many more. Douglas is also the author of Corporate Blogging for Dummies.

Check Also

top-business-plugins-wordpress-2014

The Best WordPress Plugins for Business 2014

Every year we test a ton of WordPress plugins. We manage over 30 installations of ...

10 comments

  1. Doug, I’m not sure I’m clear on what you are saying here. I could really use thie feature. Are you saying you can just take your YouTube video URL and append /0.jpg to it to get a thumbnail? Is this a dynamic image?

    Your example goes up to /2.jpg. Is that frame 2? What does the 0, 1 or 2 represent? How high can you go?

    Sorry for all of the questions but this really piqued my interest. Thanks!

  2. Hi Patric,

    No, you can’t just append a /0.jpg – notice the subdomain and the path are a bit different. No, the image is not dynamic, it’s static. I’m not sure what the number represents but 0 is a large image, 1 and 2 appear to be smaller images that are from different frames.

    Doug

  3. Just wanted to say thanks very much for this! I adapted my code to your suggestion and it worked.

  4. Just wanted to say thanks very much for this! I adapted my code to your suggestion and it worked.

  5. Brilliant, just what I was looking for. Pity the thumbnails are only 120×90

  6. Thanks, it is great.

  7. Such a practical info! thank you so much!:D

  8. Thanks for this. BTW, can we define the width and height of the images?

Leave a Reply