Saturday , 19 April 2014
Home / Hacks & Mods / Graphics / Graphics Timthumb Convert Graphics To Web Thumbnails

Graphics Timthumb Convert Graphics To Web Thumbnails

Timthumb is a script used in many WordPress themes for converting graphics to web thumbnails, errors in the script caused the creation of huge png thumbnails.

Timthumb.php uses the GD graphics library in PHP  in order to create thumbnails from your uploaded images, these images are then cached for later use. The problem is that for quite some time users have been experiencing errors with this script, errors that in some cases resulted in png thumbnail files being created that were as much as 6 times bigger than the original jpg files that were uploaded.


As an example please check the properties of the images above & below 

Graphics Timthumb Convert Graphics To Web Thumbnails

The top image is 14.3kb which is more or less the size of the original image, saved on my laptop.

However the timthumb.php thumbnail script would for some obscure reason, convert any uploaded images to png format as in the case of the image to the left. This resulted in an image of 99.3kb which is 6.9 times bigger than is actually required.

As you can imagine this has been disasterous for site load times as even small web thumbnails of around 2.5kb would end up being converted to png graphics of around 15kb.



The Solution To This Problem



Luckily after much searching, trawling the net & asking questions on various forums I was eventually pointed in the right direction by none other than one of the staff at my hosting company (Thanks again guys)

There is an updated version of the Timthumb script available to download here Timthumb.php

After completion of the download, please remember to take a complete backup of your database before proceeding any further.

Now extract the file and then upload to “wp-contents/themes/your theme/includes/timthumb.php” overwriting the original file, then whilst still using your FTP client, open the folder called cache & delete all files that are there, this will force fresh copies to be taken with the new script. That is all you need do & hopefully your timthumb.php script will now convert graphics correctly to produce your web thumbnails.

About Steve Nickson

Steve is a UK ex-pat currently living in the Philippines, he has been involved with computers for over 24 years, the last 7 years focusing on SEO & Social Media strategies, Web Promotion & Affiliate / Internet Marketing. He is constantly testing new ideas & is always keen to share his knowledge & expertise with fellow bloggers. Connect with Steve using the links below.
Add Comment Register

Leave a Reply


Steve NicksonHey guys,

we know your probably just as busy as we are, but we would really appreciate it if you could spare just a few minutes of your valuable time to like us on
Thank You