WP TimThumb Error 500 Driving Me Nuts

About a month ago, some of you might notice, that my sites starts to have missing pictures of and on. Occasionally at peak hours you might even hit a server error 500. I contacted the administrator of the hosting and they told me my server was using up all the memory on the hosting site thus creating error pages. Coming from a technical background of frontend and a winny bit of backend. I managed to find out based on googling that the culprit was caused by tinthumb.php the function used by my wordpress theme to create small thumbnails you see in the blog.

Basically, what the tinthumb does is to take the picture that you uploaded for thumbnail, resize and crop it into a suitable and compact size so that, it saves space and loads faster. However, everytime it does that, it uses up memory of the server. I tried multiple ways of fixing this, by replacing tinthumb.php with the latest one here (this method works for some people but, unfortunately not for me) .

Then, there’s this folder permission thingy from this article here. Again it didn’t work for me either. Finally I gave up everything, since, I’m resizing and optimized my own thumbnail files – why do I need timthumb in the first place?

So, I did a quick template hack on the first page of the theme to bypass the timthumb for those people using this theme (called TheStyle) from elegantThemes.

Doing so, makes wp directly take the files assigned from the thumbnail. Which means, if your files are huge, they will take a longer time to load but, hey if you are resizing and optimizing the files like me who cares right? Entry.php should be placed in includes folder under your TheStyle Themes.

NOTE UPDATES (August 2011) For those having problem, Elegant Themes has come out with a new version which exclude (after 2.1) timthumb. Download latest version there if you are still a member, but if you are not, use the solution to bypass that below.

Entry.php modification for Elegant Themes – Entry PHP File For TheStyle (ElegantThemes) (608 downloads)

Comments

comments