add tools to optimize images

(easy-thumbnails can use it)