TimThumb Quality Settings

TimThumb is no longer supported or maintained.
More information →

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 of it’s existence.

To change the level of compression all you have to do is edit the ‘q’ (which stands for quality) parameter in the query string.

If you don’t set the value then a default value of 80 will be used. This generally gives a good trade off between speed and quality, however if you are running a photo site or need to optimize your images for speed, then perhaps you will want to tweak things.

The allowed values are between 0 and 100.

  • q=0 is the most compression you can have on the image
  • q=100 is the least compression – totally uncompressed

Personally I would never use a quality of 100, it will increase the file size massively for little to no visible gain. If you want to increase the quality then around 95 is the highest you would need to go. The quality level there should be enough for most people.

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

21 Feb 2012

Complete TimThumb Parameters Guide

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...
06 Jul 2009

A Brief History of TimThumb

When we were building Mimbo Pro – Darren came up with the idea of automating the image thumbnail resizing – and this was the idea that sparked the development of TimThumb.This was all part of making the theme site as...
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...
06 Dec 2010

TimThumb: Improved Speed and Other Changes

Recently, when I haven’t been working on WPAdvent, I have been tweaking and improving TimThumb. In fact there’s been a couple of cool new features added that make it a much more useful peice of kit.The big changes boil down...
27 Sep 2014

TimThumb is No Longer Supported or Maintained

A long time ago – when making our first premium WordPress theme, Darren and I made TimThumb. TimThumb has been amazing – but it’s also not been without it’s share of problems.In particular in 2010 there was a major security...
05 Mar 2024

TimThumb Image Resizer and Website Security

My friend Alex Denning recently asked me to write some bits about TimThumb for an article he was putting together.The main purpose of TimThumb was to dynamically resize images on websites, making it easier for web developers to manage their...