When we were building Mimbo Pro - Darren came up with the idea of automating the image thumbnail resizing.
This was all part of making the theme site as easy as possible to maintain. Initially it was based loosely on phpThumb stripping out all the fluff and making it nice and streamlined.

Development was started by Tim (hence the name) one of the programmers at Category4 where Darren worked. Shortly after the release of Mimbo Pro, with Tims blessing, we decided to open source the code releasing TimThumb on Google code, and that's when everyone else started using it.
Nowadays 95% of the premium themes teams are offering TimThumb support - and it's a great feeling, knowing so many are making use of code I worked on.
I have now taken over development of TimThumb entirely which means that most new features and bug fixes come out of my requirements and findings. Of course I do check the issues list at Google code, but I probably don't do that as often as I should.
As well as simply resizing and cropping images some of the new features I have introduced since the release of TimThumb last year include:
- Alpha image resizing for gif and png images
- Improved image browser caching
- Automated cache clearing, reducing the size of the cache files on the server
The future
Currently I am working on a handful of new features for TimThumb. The two main ones are reintroducing jpg image compression (I removed it to simplify code and to introduce alpha image scaling ie transparent gifs - turns out to be less good an idea than I thought), and adding remote image resizing (resizing images from external domains eg flickr.com).
These two features should help make TimThumb even more widely used, and will also answer some of the support requests I've been receiving recently. It doesn't end there though - as I am sure there are many new features people want, including some of my own.
Now I need people to help beta test the new version of TimThumb, in particular the remote image resizing so if anyone is interested let me know in the comments and I will send you an email with the link. This is technically quite a big update so I want to make sure it is all working before committing to Google Code.
53 Responses to “A brief history of TimThumb” Leave a reply ›
since I've cracked TimThumb's image resizing issues of yore, sign me up
Awesome, Ben! I recently released 5 WordPress themes over at ThemeForest, and every one of them (now) uses TimThumb for dynamic image resizing. The only reason I had gone with Smart Image Resizer for the first 2, was that I needed to have a variable height on some images. TimThumb requires a width and height, while Smart Image Resizer doesn't. But man, the headaches that script caused! Nearly every support request I endured was due to Smart Image Resizer compability issues. Not a single one since switching to TimThumb.
Anyway, I'd love to beta test the next version. I use transparent PNGs on my own blog and have been manually resizing them for smaller versions.
Two Feature Suggestions:
* Focal Point - TT crops from the center - would love to see a feature for a user specified point of interest. Even something simple like Left, Center or Right would be better than just center. It'd be nicer still to define nine regions (TL, TC, TR, L, M, R, BL, BM, BR)
* Percentage Scale: Currently TT asks for a defined width or height. I want the height at 100% while using a width defined in pixels - this stops the image from cropping. (I currently use "0" to fool TT into using 100% for W or H)
Thanks guys - I shall send over the new versions in a second
Matt - Not sure which TimThumb you're using but there is a version that supports just supplying one dimension (the version I will send you works for sure) so maybe you can switch
Kel - thanks for the suggestions. As I mentioned about the percentage scale one "should" work. The focal point would be handy if you know what you're doing but I am not sure how useful it would be when making themes as you have no idea how people will use the image...
Very impressive mate, I'm gonna try and use this in the sports site I'm developing. Nice one!
Excellent work on the script. I would like to beta test the new version and am particularly interested in being able to use external off domain images for several shopping sites I am developing.
I've been using timthumb on http://www.modelfeed.com and I need to pull some thumbs from Vimeo for a new feature. I'd love to try the new version out and check the remote resizing features.
Hi Shandy and Kevin - thanks for the offer of help. I am at work now but will make a note to send you the latest version when I get home.
"The future" as you put it, looks pretty awesome!
Eager to test the new version of TimThumb when you get a chance.
I am trying to create a Word Press site where I can market my fine art prnts. The thumbnails are the problem as I don't know if I can get TomThumb to resize the entire image of each print. I can't cut the image in the thumbnail. I need thumbnails that vary in size as my prints do. Can this be done with TomThumb? It would be very helpful to the thousands of artist out here who want to manage their own sites (WordPress) and present the entire image in the thumbnail. Help!
Hi Ben,
I'm doing some more work at the moment on a project and I have a testing site on a subdomain. The paths to the images are all on the same subdomain but timthumb wont show the images. I've never used it on a site with a subdomain before and ws wondering if this comes under the same category as a different domain? Presumably that will be resolved by the same code as the cross domain fix?
Shandy
I've used and am using phpthumb/timthumb for several (WP) sites.
And I am very curious about the cross-domain feature. Please mail me copy of the beta version, I will try it out since I'm in the middle of testing anyway...
Good luck with it.
I have actually fixed timthumb.php to work cross domain. You can get it here:
http://bit.ly/7eOpHW
I'll have to have a look at your changes. TimThumb does actually work across domain now. The reason I block it is for security rather than ease of use.If you allow files from any domain it will be a lot easier to load a php file onto someone elses website.
I do agree with the security issues, I have used it on a few projects, in conjunction with my WPMU alterations to the file.
These are definitely hacked, but oh well
Ben,
Thanks I'm excited to try it out. As of today I have not received your e-mail with the latest code.
I'm going to be writing a new post with a download link and an explanation of how to set it up. Hopefully that will make things a bit easier for everyone
I would love to test the new version as well... I will check back later for the download link. Thanks for all your hard work on this!
The post is up and online so you can now get the latest TimThumb beta without having to wait for me to sort things out
Full info here
Works great. I had no problems getting the cross domain stuff to work and in fact for the purpose I am using it I can actually disable the domain checking with confidence. Great work Ben
I have encountered my first problem using Tim Thumb. I'm sure it's nothing to do with the code but rather the server it's running on but I thought I could ask and see if anyone know's a reason. For some reason, although the temp/cache folder is writable the images are created in it with 0 bytes. The file is there but it has no data. I'm stumped. Anyone know a reason why that might be. Oh, the images in question are from external domain.
Thanks
Hi Ben
TimThumb and WPMU compatibility - And now for something completely different!
I'm sure I speak for many WPMU OP's when I say this - we have TRAWLED the INTERNET, in search of the final answer to compatibility between TimThumb and WordPess MU (blog directories and cache permissions etc.. etc.. etc..).
Now that you've taken on this much required, requested and popular varmint of a script, can you please implement your fine knowledge to solve this if not controversial issue because there are more and MORE WP and WPMU theme designers implementing this script - it's becoming a necessity!
Now then, personally, I would go as far as to offer YOU "no one else" no more than (three sheep AND one fine young goat) in return for getting this predicament finalized and sorted - yes, as you've ascertained quite rightly, I'm a farmer and I reside in Kurzukstan.
Would you be interested in this offer - seriously!
If so, contact me immediately, and I will arrange for my sister, who is also "available for extra or intra marital relations" to contact you in due course with delivery of these fine specimens wherever you request - BTW: anything goes, say no more - mum's the word!.
Thank you - honorably awaiting your reply
Borris
Hi
Thanks for your very kind offer but I am more interested in camels. If you had a couple of those then we might have a deal?
What I really need though is ftp access to a website using a WPMU install that doesn't work. I have tried asking for it before but nobody wants to share. I have installed WPMU myself and TimThumb worked fine so I need to be able to see it not working and modify the code on the server so I can test it fully. I want it to work but at the moment am having a hard time getting a method for testing it. If you can help me with the testing then you can send the login details via my contact page (http://www.binarymoon.co.uk/contact/)
Thanks
Aaaa, Camels.. Alas, I'm afraid sir that this is an area I can not deal in. Although, one of my sisters "Umfoofoo" does have a surprising likeness to the beast. Below is a picture of her, don't be afraid on first view, as they say, beauty is in the eye of the beholder..
My sister Umfoofoo is on the left of the picture, she is hanging out with one of her girlfriends.
I will contact you in due course..
Borris
Hi there Ben...
Just a quick question... I'd like to implement TimThumb on my site. However, the site has been up and running for years now, and I have loads of images I'd like to keep... so is there a way to change the path to images in TimThumb so that the data in the Image field doesn have to be for example wordpress/uploads/images/image.jpg but just image.jpg?
Tnx in advance...
n.
Hi - there's no reason you can't modify TimThumb to adjust the image path to point wherever you like. A lot of it depends where you want to place the TimThumb script. If you placed TimThumb in the image directory you could simlpy pass the filename as the source (make sure to include the cache directory as well)
Hey Ben,
I know I'm a bit late to the party, but I would love to beta test these very much asked for additions on behalf of all WooThemes members
Lol, just saw the link to the beta test post.
I am having the same issue with WPMU and Tim Thumb... In my case, I have the lastest version of Mimbo Pro installed as the theme for the front blog installation of WPMU... I would be happy to help... as I can't definitively solve my problem. Has anyone found a solution to this yet.. I would love to figure it out..
If you are still looking for a wordpress-mu server setup to test your scripts on I am more than willing to provide a site and access.
I have probably collected a few dozen themes that use timthumb, and not one of them works in an mu environment. It all comes down to the server paths due to rewrite issues.
Simply send me an email letting me know your interested, and I'll respond within 24 hours.
It would be HUGE to finally have this problem resolved once and for all.
Sorry, no sheep, camels, or sisters to offer, just a couple of seriously lazy cats
Hi Shawn - thanks a lot for the offer. I have just posted a short explanation of how I made TimThumb work with WPMU. It'd be great if you could test my method on one or two of your themes?
Hello
Thank you for your very useful script
I am very interested in having the link in order to resizing remote images
I'd like to test the remote image fetching! Thanks!
Hi Ben,
Thanks for the nice script! I've just recently used this script. I've no idea that this timthumb script just recently developed as os and still on beta.
I'm using timthumb script for my wp theme development but having trouble with image catching from attachment url using :
src=ID); ?>Other than the attachment, everything seems fine. If i'm using it on my machine (using easyPhp) everything is alright but not on my domain. and this problem is only when using that specific attachment function mentioned.
Thanks for help.
seems like having trouble viewing the php code.
src=[php open] echo wp_get_attachment_url($post->ID); [php close]
i hope this turn out ok.
I can say this is a really great script. Thank you very much!
The only problem I've encountered is when trying to move my blog from a domain to another. The thumbs aren't simply displayed. I have had the same problem when uploading files from the BlackBerry for Wordpress App. What can I do to avoid this issue? Thanks!
Is it will be good if you can tweak this code to prefer future problem such as readfile problem and enable to use crop parameter, such as I need to crop the image from the top left, or some times we need to crop from the center of images.
Where do I download latest version? Can't find downloadlink
Thanks for creating timthumb and make it open source. It really helps us
I would be really interested in testing the beta of TimThumb with flickr. I am using a theme that uses timthumb but none of my pictures will show up because all of my posts are done using flickr. Would love to hear from you!
Hi - the beta is no longer a beta. I would grab the latest version from Google code as that is the most up to date.
Thanks for the reply. I downloaded the file, deleted the current text and then copied and pasted it into my timthumb.php file on my theme editor (Platformate)
I don't know if I am doing the right thing as I am a complete novice.
Anyway after I did that I enabled Timthumb and the result was exactly the same as it was with the old code. The flickr pictures come up as red x's in the place of the thumbnail. The one picture that is uploaded onto wordpress as opposed to flickr does show up, same as with the old code.
For now I have disabled timthumb as the red x's can be quite unsighly as you can imagine.
Please please please if anyone can help me out here I would be eternally grateful!
Thanks in advance!
I like the script but I have old version. Is it possible to download latest version from some site but no from SVN. I would not like to install subversion client just for once. Thank you.
You can download the source from Google Code without SVN. Just browse to the timthumb.php file and hit "very raw" which takes you here - http://timthumb.googlecode.com/svn/trunk/timthumb.php
Then what do u do after u have the code? Do you paste it into the timthumb folder with the other code or replace it? Or put it in a file in the cpanel... Excuse the ignorance I'm new to all this web stuff!
You should replace the contents of the existing timthumb file with the code that is on the google code website.
I have done exactly as directed and no joy. I enabled the timbthumb "first image" feature in my theme and My flickr photos still show up as x's on the front page where there should be pictures.
If anyone could tell me where I could be possible going wrong I'd much appreciate it!
Phew Thanks to those that replied on the other post. I got it sorted after creating the temp file in the scripts folder of the theme.