TimThumb is a simple, flexible, PHP script that resizes images. You give it a bunch of parameters, and it spits out a thumbnail image that you can display on your site. It has been massively used in new WordPress themes. Peoples involved in development of TimThumb are Darren Hoyts, Tim McDaniels and Ben Gillbanks. You can download/view the latest version of TimThumb at http://code.google.com/p/timthumb/.
I have recently set up a new WordPress blog that use TimThumb.php to for thumbnail and image resizing. When I test the blog on localhost using XAMPP there was no problem at all. The theme works exactly as the theme’s preview page. A problem arises after I uploaded and installed the blog to my 000webhost server. Some images did not appear as they should be. I check all settings in my server and I could not find any problem. Then I tried to install the blog to my Exabytes server and everything works fine. It is now obvious that the problem is with 000webhost. I finally Googled some information and found out that the timthumb.php file is not suitable to be used on 000webhost server.
Thanks to Bad Karma[CORE] I manage to solve this problem with a bit of my own tweak. The file that attached in the forum still don’t work for me but I manage to find out where to edit the source code. The file from Bad Karma[CORE] have redundant php scripting block (<?php ?>). What I did was just removing those and now my TimThumb works perfectly on 000webhost. I did not check what are the difference between the working timthumb.php file and the original timthumb.php on the Google Code. You may check them for yourself if you like.
My working TimThumb for 000webhost server: TimThumb.phpRelated Posts