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.
|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|
Ben is a lifelong Nintendo fan who also likes to build websites, and develop games. He also buys way too much Lego.