Complete TimThumb Parameters Guide

TimThumb is no longer supported or maintained.
More information →

It was recently pointed out to me that there’s no single place to get a list of all the TimThumb parameters so I thought I would put together a page explaining them, and link to the relevant tutorials/ explanations.

TimThumb Parameters

  stands for values What it does
src source url to image Tells TimThumb which image to resize › TimThumb basic properties tutorial
w width the width to resize to Remove the width to scale proportionally (will then need the height) › TimThumb width tutorial
h height the height to resize to Remove the height to scale proportionally (will then need the width) › TimThumb height tutorial
q quality 0 – 100 Compression quality. The higher the number the nicer the image will look. I wouldn’t recommend going any higher than about 95 else the image will get too large › TimThumb image quality tutorial
a alignment c, t, l, r, b, tl, tr, bl, br Crop alignment. c = center, t = top, b = bottom, r = right, l = left. The positions can be joined to create diagonal positions › TimThumb crop position tutorial
zc zoom / crop 0, 1, 2, 3 Change the cropping and scaling settings › TimThumb crop scaling tutorial
f filters too many to mention Let’s you apply image filters to change the resized picture. For instance you can change brightness/ contrast or even blur the image › TimThumb image filter tutorial
s sharpen   Apply a sharpen filter to the image, makes scaled down images look a little crisper › tutorial
cc canvas colour hexadecimal colour value (#ffffff) Change background colour. Most used when changing the zoom and crop settings, which in turn can add borders to the image.
ct canvas transparency true (1) Use transparency and ignore background colour

Was it good/ useful/ a load of old rubbish? Let me know on Mastodon, or BlueSky (or Twitter X if you must).

Link to this page

Thanks for reading. I'd really appreciate it if you'd link to this page if you mention it in your newsletter or on your blog.

Related Posts

19 Aug 2010

Using TimThumb Part 3: Image Filters

So far I have documented the basic TimThumb functionality, and how to resize images that are on external domains and now things can get interesting. In this part I will talk about some of the features that have been available...
27 Mar 2011

TimThumb Proportional Scaling

Moving the crop position used to be the most requested TimThumb feature – but then I added it, and so something else had to step up and replace it.The next most requested feature is proportional image scaling. To be honest,...
17 May 2011

TimThumb Quality Settings

Recently I have had a couple of emails about changing the amount of compression on TimThumb cropped images. The change itself is really easy, however I thought I would write it up as a reference for those who aren’t aware...
05 Aug 2010

Using TimThumb part 1: Getting Started

TimThumb has always been built with simplicity in mind. However there are a few things it can do that have not been exposed before.Inspired by a comment from RBhavesh I have decided to write a series of posts in which...
04 Nov 2010

TimThumb Troubleshooting Secrets

I often get asked questions about TimThumb and why it doesn’t work in certain situations. I can generally tell what is wrong with the script within about 60 seconds of being sent a demo url. Below are my top tips...
15 Mar 2012

TimThumb Configurations

As a TimThumb user, making changes to the settings has always been a bit of a pain. It’s possible, of course, but if you make changes – and then want to update the script – then you have to make...