solostream

Automatic thumbnail image resizing options

Miriam Schwab | June 1, 2008 | 8 Comments

I manage a few blogs that use thumbnail images to spruce up the appearance of the site, and make it more enjoyable for readers. As we’ve discussed here in the past, an efficient method for adding thumbnails to your blog is with custom fields. But finding the right image, resizing it (ugh), uploading, etc., is such a pain in the neck that I often find myself not blogging because I can’t face it. On one of my blogs, I’ve just decided to post without the images, since I know it’s the only way I’ll ever publish anything.

So imagine my delight when I found the following two fantastic solutions: Justin Tadlock’s brilliant Get the Image WordPress plugin and Darren Hoyt’s TimThumb PHP Script. Both the plugin and the script take most of the annoying work out of inserting thumbnail images in your blog.

Justin Tadlock’s Get the Image plugin

This plugin works in three steps (as explained on Tadlock’s blog):

  1. It activates a script that gets an image either by custom field input or post attachment.
  2. Then it tells the script what the default image size should be. It tells the script to look for the WordPress-generated thumbnail if there are no custom field images found. You can use the values “thumbnail,” “medium,” or “full” for this (those are three image sizes WordPress generates).
  3. If there are no images found, the script displays a default image found at “/wp-content/my-image.jpg.”

As Justin says, this has a lot of potential applications – you can use to for feature images, for displaying images in your sidebar, etc. He even offers to help users implement the plugin on their blogs if they ask in his forums.

Darren Hoyt’s Tim Thumb PHP Script

Hoyt originally created this script for use in his Mimbo Pro premium WordPress theme. To use it, you need to complete two steps:

  1. Copy the source code into a new document called ‘timthumb.php’ and place it in a folder on your site (ex: /scripts/).
  2. Call the source code from the place in your theme files where you want the resized image to appear as follows:
    <img src="/scripts/timthumb.php?src=/images/whatever.jpg&h=150&w=150&zc=1" alt="" />

This script is more complicated than Tadlock’s plugin, and when I tried it I couldn’t get it to work. But many people are happily using it in their themes.

Talk about filling a need. If you want to include thumbnail images on your blog without the headache, this plugin or script is a must.

Get The Image WordPress Plugin

TimThumb PHP Script

Tags: , ,

Category: Plugins

About Miriam Schwab: View author profile.

Elegant WP Themes

Comments (8)

Trackback URL | Comments RSS Feed

  1. Thanks for the link, Miriam.  As you mentioned, it can be “such a pain in the neck” sometimes trying to spruce up your blog with a few extra images.  After several months of using custom fields with my themes and hearing what users had to say about it, I finally decided to just put something together.

    I keep meaning to try out Darren’s script at some point.  It looks really promising.

  2. Darren Hoyt says:

    Equally, I’m looking forward to trying out Justin’s plugin. There does seem to be a clear need for better image-management solutions for  WordPress and I hope developers continue stepping in to fill that need with scripts and plugins of their own. I’d love to see some of these ideas incorporated into the WP core package one day.
    BTW, Miriam let me know if you’re having any troubles with the script. There are ongoing weekly enhancements (see the Google Code page) which should fix most issues.

  3. Ryan says:

    Thanks Miriam, those plugins look really helpful.
    Hopefully more themes will integrate this sort of functionality.

  4. Paul Orterto says:

    I found the (paid) Viva Thumbs solution from mediatricks.biz well worth the few bucks. Awesome support too from Tim and the team and it gives masses of flexibility including image reflection and unlimited sizes from one simple to embed function call in  your theme pages.

  5. Miriam Schwab says:

    @Paul Orterto: Thanks for sharing! I’ll have to check it out.

  6. Alex Duvot says:

    Does this work with the latest version of WP and WPMU

  7. I figured out an way to combine Get the image and timthumb. Wrote a post about on my blog with the code I use in my sidebar. Enjoy! http://pappmaskin.no/2010/03/how-to-make-the-wordpress-plugin-get_the_image-work-with-timthumb/

  8. anika says:

    very nice. But it will be difficult for me to implement.

Leave a Reply




If you want a picture to show with your comment, go get a Gravatar.