Cached thumbnail Script

A very handy script allowing you to create thumbnails for any given picture.
It will also create a cached copy of the result on your server so it's quite interesting performance wise as well. In fact, it's really easy to use and does what it says very well.
For example, it has been used to create every thumbnail of this website.

TimThumb script was created by Tim McDaniels and Darren Hoyt with tweaks by Ben Gillbanks.
  • Previous Resource
  • Download
  • Next Resource

Demonstration

thumbnail 1 Size 10x10 thumbnail 2 Size 40x40 thumbnail 3 Size 70x70 thumbnail 4 Size 100x100

How to setup

Create an image which src attribute begins with src="Path_to/timtumb.php?"

Add the following parameters with their values:

  • SRC: Source
  • W: Width
  • H: Height
  • ZC: Zoom crop (0 or 1)
  • Q: Quality (optional, default is 75 and max is 100)

The obtained string should follow the following pattern:

<img src="Path_to/timtumb.php?src=[SRC]&w=[W]&h=[H]&zc=[0|1]&q=[Q]">

For example:

  1. <img src="Path_to/timtumb.php?src=img1.jpg&w=100&h=100&zc=1">

Why not share this here:

  • Tweet this
  • Buy the author a coffee
  • Bump this
  • Digg this
  • Post this on Del.icio.us
  • Post this on StumbleUpon
  • Post this on Reddit
  • Post this on Technorati
  • Post this on Google
  • Post this on Facebook
  • Email this to a friend

You may also like:

  • jQuery Form Validation Plugin
  • How to easily integrate a PayPal Checkout with PHP
  • How to turn any jQuery plugin into a WordPress one
  • My Favourite MYSQL functions
  • jQuery FancyBox Plugin
  • Form Cloning jQuery Plugin

Leave a Comment

Posted Comments

Barb
Sorry I posted. Silly error on my part. I fixed the thumbnail size. Thanks anyway!
From Barb at 21:29 19/03/10 { Reply }