Title: CW Image Optimizer
Author: Jacob Allred
Published: <strong>2011 年 7 月 27 日</strong>
Last modified: 2014 年 12 月 18 日

---

搜索插件

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://s.w.org/plugins/geopattern-icon/cw-image-optimizer.svg)

# CW Image Optimizer

 作者：[Jacob Allred](https://profiles.wordpress.org/zulugrid/)

[下载](https://downloads.wordpress.org/plugin/cw-image-optimizer.1.1.10.zip)

 * [详情](https://cn.wordpress.org/plugins/cw-image-optimizer/#description)
 * [评价](https://cn.wordpress.org/plugins/cw-image-optimizer/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/cw-image-optimizer/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/cw-image-optimizer/#developers)

 [支持](https://wordpress.org/support/plugin/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 Smush.it plugin. Unlike the WP 
Smush.it plugin, your files won’t be uploaded to a third party when using CW Image
Optimizer. Your files are optimized using the Linux [littleutils](http://sourceforge.net/projects/littleutils/)
image optimization tools (available for free). You don’t need to worry about the
Smush.it 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](http://www.jacoballred.com/) at [Corban Works, LLC](http://www.corbanworks.com/).
Based on WP Smush.it.

## 屏幕截图

 * [[
 * 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](http://sourceforge.net/projects/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 http://packages.sw.
    be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm && 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](http://sourceforge.net/projects/littleutils/):
    _cd /usr/local/src; wget http://downloads.sourceforge.net/project/littleutils/littleutils/
    1.0.27/littleutils-1.0.27.tar.bz2?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Flittleutils%
    2F_
 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_

#### Troubleshooting

**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.

## 评价

![](https://secure.gravatar.com/avatar/94839013e8ab66310319b92c091d06bff76e31d35dd61043192e88d956a128ca?
s=60&d=retro&r=g)

### 󠀁[Well done!](https://wordpress.org/support/topic/well-done-257/)󠁿

 [ksere](https://profiles.wordpress.org/ksere/) 2016 年 9 月 3 日

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.

![](https://secure.gravatar.com/avatar/85f1e397187c7681514f0f4b99c8aa6e022b062b24575cbdc10652e02d82caa2?
s=60&d=retro&r=g)

### 󠀁[Very handy if you have own server](https://wordpress.org/support/topic/very-handy-if-you-have-own-server/)󠁿

 [Grzegorz.Janoszka](https://profiles.wordpress.org/grzegorzjanoszka/) 2016 年 9
月 3 日

I have been using EWW, but it had so many options and it was taking too much space
in my backups. This plugin is very tiny and does the same job.

![](https://secure.gravatar.com/avatar/79f99591a1d2f777aa515cb51f8bceac2ecc4b3ea851ab4bf8549cc328f87c60?
s=60&d=retro&r=g)

### 󠀁[Works well](https://wordpress.org/support/topic/works-well-671/)󠁿

 [Robbie_berns](https://profiles.wordpress.org/robbernsteinzgmailcom/) 2016 年 9
月 3 日

Installed easily, great compression

![](https://secure.gravatar.com/avatar/ee17d9ff3d72fbbf0ce2e5ef3ce8c2b16be7e3fef9e090daff54a49aac22e12a?
s=60&d=retro&r=g)

### 󠀁[Works great](https://wordpress.org/support/topic/works-great-2414/)󠁿

 [fmlcorporation](https://profiles.wordpress.org/fmlcorporation/) 2016 年 9 月 3
日

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.

![](https://secure.gravatar.com/avatar/e395b5f0f60d90bc2527af4a351c187352baad4ed1ce341a5729a87e271024a9?
s=60&d=retro&r=g)

### 󠀁[ok](https://wordpress.org/support/topic/ok-265/)󠁿

 [DominicLindner](https://profiles.wordpress.org/dominiclindner/) 2017 年 2 月 8
日

![](https://secure.gravatar.com/avatar/9c1d3a0a896c7ebf2a5cc0c250737de06bfc91ea9c4a680990a57cf71825d3c6?
s=60&d=retro&r=g)

### 󠀁[super](https://wordpress.org/support/topic/super-678/)󠁿

 [Den999](https://profiles.wordpress.org/den999/) 2017 年 2 月 7 日

Good. I no need stupid smush.it. Info: not working with Apache2ITK (permissions,
I think), but works with Apache2/FastCGI

 [ 阅读所有14条评价 ](https://wordpress.org/support/plugin/cw-image-optimizer/reviews/)

## 贡献者及开发者

「CW Image Optimizer」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ Jacob Allred ](https://profiles.wordpress.org/zulugrid/)

[帮助将「CW Image Optimizer」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/cw-image-optimizer)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/cw-image-optimizer/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/cw-image-optimizer/)，或通过[RSS](https://plugins.trac.wordpress.org/log/cw-image-optimizer/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/cw-image-optimizer/)。

## 更新日志

#### 1.1.10

 * Fix exec check on some systems.

#### 1.1.9

 * Updated littleutils instructions.

#### 1.1.8

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

#### 1.1.7

 * 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.

#### 1.1.6

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

#### 1.1.5

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

#### 1.1.4

 * Removed extra call to mime_content_type()

#### 1.1.3

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

#### 1.1.2

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

#### 1.1.1

 * Fixed versioning error.

#### 1.1.0

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

#### 1.0.2

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

#### 1.0.1

 * Updated readme.txt to conform to WordPress standards.

#### 1.0.0

 * First edition

## 额外信息

 *  版本 **1.1.10**
 *  最后更新：**11 年前**
 *  活跃安装数量 **200+**
 *  WordPress 版本 ** 2.9 或更高版本 **
 *  已测试的最高版本为 **4.1.42**
 *  语言
 * [English (US)](https://wordpress.org/plugins/cw-image-optimizer/)
 * 标签
 * [attachment](https://cn.wordpress.org/plugins/tags/attachment/)[attachments](https://cn.wordpress.org/plugins/tags/attachments/)
   [image](https://cn.wordpress.org/plugins/tags/image/)[images](https://cn.wordpress.org/plugins/tags/images/)
 *  [高级视图](https://cn.wordpress.org/plugins/cw-image-optimizer/advanced/)

## 评级

 3.9 星（最高 5 星）。

 *  [  10 条 5 星评价     ](https://wordpress.org/support/plugin/cw-image-optimizer/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/cw-image-optimizer/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/cw-image-optimizer/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/cw-image-optimizer/reviews/?filter=2)
 *  [  4 条 1 星评价     ](https://wordpress.org/support/plugin/cw-image-optimizer/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/cw-image-optimizer/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/cw-image-optimizer/reviews/)

## 贡献者

 *   [ Jacob Allred ](https://profiles.wordpress.org/zulugrid/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/cw-image-optimizer/)

## 捐助

您愿意支持这个插件的发展吗?

 [ 捐助此插件 ](http://www.corbanworks.com/cw-image-optimizer/)