Most of you might already heard of Timthumb php script to compress (re-size) images on fly. If you have not heard of it then please view this post from the author – Darren Hoyt.
This entry will not show you how to use it as you can read the full documentation and demo on the author’s blog. I recently used Timthumb php script for quite few projects (TE, Mary Chocolatier ..) and it actually save a lot of bandwidth and development time. However, all of the pages which use Timthumb script does not validate XHTML and generated many errors and warning messages.
To get the most out of TimThumb script and improve your pages to pass W3C XHTML validation check, please follow this below edit:
Original code:
<img src=”/scripts/timthumb.php?src=/images/whatever.jpg&h=150&w=150&;zc=1″ alt=”" />
Change it to:
<img src=”/scripts/timthumb.php?src=/images/whatever.jpg&h=150&w=150&zc=1″ alt=”" />
Now come back to W3C Markup Validation Service to see how your page been approved.

Thanks a lot for this small fix :D
Man! awsome thanks :)
That saved me a lot of hassle, many thanks.
That is excellent, I managed to implement timthumb onto my vivvo installation and it work perfectly. Thanks for you help guys.
I need this….thanks for this post..
I would like to change it as you suggest, but where do I find the source code to make this a permanent edit for sitewide?
I have found the timthumb script ok in /my-theme/scripts/timthumb.php, but I don’t see the code here to change it either…
It would be great if you could let us know where to do it too. Thanks!
very good
hi friends i am unable to write the image compression code in php.If u have then please send it to me…
thanks in advance
Thank You
Thanks a lot, i resolve now 22 errors! really awsome.
Thanks for you help guys.