Two questions regarding image compression

I have a Wordpress blog that has about 5,000 images which are associated with blog posts and need to be optimized.

I’m wondering what would be the best tool to automate this process? I was hoping to download the image folders from Wordpress to my local drive, run a tool and then upload the image folders back up to the website. Ideally, the final images would need to be the same size and file format as the original.

The second question that I had was moving forward, what would be the best online tool that I could use to optimize images that I include with new blog posts?

Thank you

Sergey Chernychev has a pretty good presentation that he did for various webperf meetups on an image optimization pipeline for content publishing:

For lossy optimization (photos) which I assume is the content for the blog posts it basically boils down to:
JpegMini -
imgmin -

install mod_pagespeed onto the server containing your wordpress site. that apache module contains image compression and resizing that will serve optimized images according to a specified compression ratio and to the .

download those images if needed from the pagespeed cache.

look at “klix image dimsum”, a wordpress plugin that does the same thing for those who dont have root access to webservers.

download those images if needed. from wp-content/klixdimsum or whatever folder you set.

run wget on your site so it does all the pages.

I contend that image compression should be done outside of web delivery. Have a look at convert, which is a part of the imagemagick package. All free.

For Macos X users, I suggest ImageOptim , a free tool easy to use to optimize images before publication.