We have included TimThumb (thumb.php) in mostly all of our themes, which is an open source image resizer. In our support forums, we often find that many problems related to thumb.php. To help you with these common problems, we’ve put together a troubleshooting guide to help you find a solution quicker.
If you are on HostGator
If you are hosted on HostGator, all you have to do is contact them by going to: www.hostgator.com
Click where it says: ‘Click here. Live Chat’ on the upper-right corner of the web-page and tell the following:
add following rules [ 1234234,340151 ] to mod_security for www.yourwebsite.com
Please whitelist for the domain
That is all you have to do. Wait a couple of minutes and you’ll probably see the images on the front page of your website. The mod_security settings does not allow this script to function properly.
Since thumb.php or timthumb.php is an open-source project, more and more WordPress theme developers use this little script and integrate it on their projects. So keep your eyes open because I’ve seen thumb.php used on other themes as well.
Finding the problem
Are your thumbnails not showing up? If the image resizer doesn’t work it will just show the post title instead of the image where the image was supposed to be. If you are using a theme with a javascript slider (Restaurant) you will not see this, but only the slider trying to load an image.
First thing you should check is the thumbnail URL. It will normally tell you what”s wrong quite easily. Here are a few ways to find the URL to your thumbnail:
- Right-click on your image and open/view it in a new browser tab
- Do a view source on your website and look in your source code for the image URL (search for thumb.php) and paste it into your address bar. This is useful on themes
- Install FireBug and, right-click on the image and select “Inspect Element’. You will then get a window below which will show the source code and you can copy the image url (just click on the http:// part and it will become selected so you can copy)
Once you have the image URL it should look something like this (click this link to see the image being resized)
If your image does not show, you will probably get any of these errors explained below:
Cache Folder
One of the most common errors is that the cache/ folder does not have write permissions. If your error message is something along the lines of “Permission denied…’ and you can see it referencing you /cache folder, then you probably have not set write permissions to it.
To do this, you will need to “CHMOD’ the folder in your FTP client to 777 (or 755 or full write permissions). Check out this tutorial on how to do that. The folder you will need to change the permissions is “/wp-content/themes/yourthemename/cache’. This is the folder where the thumbnail generator stores cached images.
PHP GD Library
The thumb.php script uses PHP GD Library to resize the images, which is usually included with PHP and should be installed on your web host. Some small web hosts haven’t done this and you will then get a error like “GD Library Error: imagecreatetruecolor does not exist’. You should ask your web host to activate PHP GD or find a better hosting provider, since this should be included and is not a hassle to setup for them.
There are also some older versions of PHP that will give an error like “gd-png: fatal libpng error: zlib error’. This should also be fixed by your host by upgrading to a newer version. This usually only happens with PNG images, so you can try to upload your images in JPEG format instead.
Are the images hosted on your domain?
Are the images hosted on your own server ? Or are you trying to pull images from some image sharing site E.g. flickrs, photo bucket, etc. Tim thumb require that you host the images in your own server only. This is a security measure put in place by the author. If you are trying to use images from an outside source it will not work.
Does your server have mod_security settings that are causing this ?
Some servers may have mod_security settings that will stop the script from running properly. Therefore please contact your webhost and ask them about this.
Are you uploading image with huge resolutions ?
If you are uploading image with huge resolution, then your server might not have enough memory to make a cache file. Therefore please try to upload images with sizes like 600 pixels width. If you are directly uploading images which are captured via Digital cameras, then they save images in very high resolution. Therefore you will need to resize the images.
Still having problems?
If you still can’t get your thumb.php to work, then drop us a line in the HelpDesk or Support Forums. Feel free to suggest improvements.

I had a problem with thumbs not displaying in the Featured section of the Consultant theme. The error was “Unable to open image”. I then discovered that the .jpg file was a JPG 2000 file which apparently is not supported by thumb.php. Converting to PNG or regular JPG fixed it for me.