This plugin hasn’t been tested with the latest 3 major releases of WordPress. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

CW Image Optimizer


The CW Image Optimizer is a WordPress plugin that will automatically and losslessly optimize your images as you upload them to your blog. It can also optimize the images that you have already uploaded in the past.

Because CW Image Optimizer uses lossless optimization techniques, your image quality will be exactly the same before and after the optimization. The only thing that will change is your file size.

The CW Image Optimizer plugin is based on the WP plugin. Unlike the WP plugin, your files won’t be uploaded to a third party when using CW Image Optimizer. Your files are optimized using the Linux littleutils image optimization tools (available for free). You don’t need to worry about the privacy policy or terms of service because your images never leave your server.

Why use CW Image Optimizer?

  1. Your pages will load faster. Smaller image sizes means faster page loads. This will make your visitors happy, and can increase ad revenue.
  2. Faster backups. Smaller image sizes also means faster backups.
  3. Less bandwidth usage. Optimizing your images can save you hundreds of KB per image, which means significantly less bandwidth usage.
  4. Super fast. Because it runs on your own server, you don’t have to wait for a third party service to receive, process, and return your images. You can optimize hundreds of images in just a few minutes.

Contact and Credits

Written by Jacob Allred at Corban Works, LLC. Based on WP


  • Additional optimize column added to media listing. You can see your savings, or manually optimize individual images.
  • Bulk optimization page. You can optimize all your images at once. This is very useful for existing blogs that have lots of images.


  1. Install littleutils on your Linux server (step-by-step instructions are below).
  2. Upload the ‘cw-image-optimizer’ plugin to your ‘/wp-content/plugins/’ directory.
  3. Activate the plugin through the ‘Plugins’ menu in WordPress.
  4. Done!

Installing littleutils: Ubuntu 11.04 (32-bit)

These instructions were tested with littleutils 1.0.27 and Ubuntu 11.04 (32-bit, desktop edition).

  1. Download the latest version of littleutils to your Download directory
  2. Open a terminal window (Applications -> Accessories -> Terminal)
  3. Move the download to a better location: sudo mv ~/Downloads/littleutils-1.0.27.tar.bz2 /usr/local/src/
  4. Use the root user account: sudo su
  5. Install dependencies: apt-get install gifsicle pngcrush lzip libpng12-0 libpng12-dev libjpeg-progs p7zip-full
  6. Uncompress littleutils: cd /usr/local/src && tar jxvf littleutils-1.0.27.tar.bz2 && cd littleutils-1.0.27
  7. Configure and install littleutils: ./configure –prefix=/usr && make && make install && make install-extra

Installing littleutils: CentOS 6.0 (32-bit)

These instructions were tested with littleutils 1.0.27 and CentOS 6.0 (32-bit, “Basic server” configuration).

  1. Log in as the root user.
  2. Enable the rpmforge repository: cd /usr/local/src/ && wget && rpm -i rpmforge-release-0.5.2-2.el6.rf.i686.rpm
  3. Install dependencies: yum install gcc libpng libpng-devel gifsicle pngcrush p7zip lzip
  4. Download the latest version of littleutils: cd /usr/local/src; wget
  5. Uncompress littleutils: tar jxvf littleutils-1.0.27.tar.bz2 && cd littleutils-1.0.27
  6. Configure and install littleutils: ./configure –prefix=/usr && make && make install && make install-extra


littleutils is installed, but the plugin says it isn’t. If you are confident that it is installed properly, then go to the plugin configuration page and disable the installation check.

It is also possible that your binaries aren’t accessible to your web server user. You can link these binaries using the following commands:
ln -s /usr/local/bin/opt-jpg /usr/bin/opt-jpg
ln -s /usr/local/bin/opt-png /usr/bin/opt-png
ln -s /usr/local/bin/opt-gif /usr/bin/opt-gif
ln -s /usr/local/bin/tempname /usr/bin/tempname
ln -s /usr/local/bin/imagsize /usr/bin/imagsize
ln -s /usr/local/bin/gifsicle /usr/bin/gifsicle
ln -s /usr/local/bin/pngcrush /usr/bin/pngcrush
ln -s /usr/local/bin/pngrecolor /usr/bin/pngrecolor
ln -s /usr/local/bin/pngstrip /usr/bin/pngstrip


Can I use CW Image Optimizer with a Windows server?

No, CW Image Optimizer only supports Linux.

Do I have to have littleutils?

Yes, CW Image Optimizer will not work if littleutils isn’t installed. This plugin expects opt-jpg, opt-png, and opt-gif to be in the PATH.


ستمبر 3, 2016
If you have console access to your server and you are able to install the prerequisites it works like a charm! Tested on a digitalocean droplet running Ubuntu.
ستمبر 3, 2016
Great if you concerned about your privacy. The compression is done in you server with open source tools. The only issue that I had is that I had to disable the installation check. But the instructions in the README file were clear and the it worked great on my images. Not recommended for people who don’t know how to use Linux.
پروری 7, 2017
Good. I no need stupid Info: not working with Apache2ITK (permissions, I think), but works with Apache2/FastCGI
Read all 14 reviews

Contributors & Developers

“CW Image Optimizer” is open source software. The following people have contributed to this plugin.


Translate “CW Image Optimizer” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.



  • Fix exec check on some systems.


  • Updated littleutils instructions.


  • Fixed undefined variable errors caused by absolute path code.
  • Fixed undefined index errors that were happening for some file types.


  • Made it easy to skip the check for littleutils. You can now do this from a settings page.
  • Added a check for exec(). Some PHP installations have this function disabled, which will prevent this plugin from working.


  • Made it possible to skip the check for littleutils binaries. This is useful on systems where the “which” command doesn’t work as expected.


  • Fixed PHP warnings in bulk optimization code when an image didn’t have any additional sizes.


  • Removed extra call to mime_content_type()


  • Added an additional method of determining MIME type for those that are missing mime_content_type()


  • Plugin works on Macs, too.
  • Added screenshots.
  • Added donate link.
  • Fixed link to plugin homepage.


  • Fixed versioning error.


  • Added warnings when image optimization binaries are missing.
  • Don’t display optimization link if unsupported MIME type.


  • Added a warning when the plugin is activated on a non-Linux server.


  • Updated readme.txt to conform to WordPress standards.


  • First edition