Use Timthumb.