DISCLAIMER: this post is older than one year and may not be up to date with latest WordPress version.

Ever wished you could be able to upload your images, and didn’t care about manually resizing it? If yes, here is a real time saver: A php script that can resize your images “on the fly”.

To achieve this recipe, follow these simple steps:

  1. Get the script and save it on your computer (I assume you named it timthumb.php)
  2. Use a FTP program to connect to your server and create a new directory called scripts. Upload the timthumb.php file in it.
  3. Once done, you can display images like this:
    <img src="/scripts/timthumb.php?src=/images/whatever.jpg&h=150&w=150&zc=1" alt="" />

    In other words, you just have to call the timthumb.php file and pass your image as a parameter. same goes for desired width or height.

That’s all. What a real life saver this script is!

Thanks to Darren Hoyt for this awesome script!


  1. Although timthumb is a great script i think you might find the Easy Image Crop plugin useful too.

    Check it out. Available for download at http://wordpress.org/extend/plugins/easy-image-crop/

  2. Hi, i have a problem with that string, i’m using it with a plugin that show the image in the sidebar of my blog, in the homepage it works but not in the other page… why?

  3. Don’t use timthumb, it is a disaster! If you want a big hole in your wordpress installation, use it.

  4. Thanx man,

    so simple, works like a charm.

    can anybody explain why timthumb makes “holes” in the installation?

  5. Timthumb just allows you to resize the frame of the image [not the size], but until you explicitly resize it by use a plugin like “regenerate-thumbnails”, the original image will be displayed wherever timthumb is implied. The usefulness of “regenerate-thumbnails” is that it helps you resize the image and helps load the webpage faster.

Leave a Comment

Your email address will not be published. Required fields are marked *