Title: Another simple image optimizer
Author: Raffael Jesche
Published: <strong>2023 年 4 月 25 日</strong>
Last modified: 2025 年 2 月 1 日

---

搜索插件

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

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

# Another simple image optimizer

 作者：[Raffael Jesche](https://profiles.wordpress.org/raffaelj/)

[下载](https://downloads.wordpress.org/plugin/another-simple-image-optimizer.0.3.0.zip)

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

 [支持](https://wordpress.org/support/plugin/another-simple-image-optimizer/)

## 描述

Automatically optimize uploaded images (jpg, png, gif, webp, svg, avif) using the
[Spatie image-optimizer library](https://github.com/spatie/image-optimizer) and 
binary files on your host system.

New uploaded images with all image sizes (thumbnails) will be optimized automatically.

Previously uploaded images can be updated in two ways:

 1. Use the command line interface (cli) and run `wp media regenerate`, which also 
    triggers the optimization chain. If you don’t have cli access, some other plugin,
    that regenerates existing thumbnails should work, too (not tested, yet).
 2. The media library has a new column “File size” in the list view, which displays
    the new and the old file size. If an image is not optimized, there is a link named“
    Optimize” to run the optimizer directly.

**Warning:** Images are replaced with the optimized ones. Create a backup before
testing this plugin. If this is a deal-breaker for you, don’t use it.

**Important:** If the needed binary files aren’t installed, this plugin won’t optimize
anything. Don’t use it, if you don’t know, how to install them or if your web hoster
doesn’t provide them.

**Notice:** WordPress has no support for SVG files. Technically this plugin can 
optimize them, but I didn’t run any tests with plugins, that add SVG support to 
WordPress. I was able to optimize svg files automatically in a local test setup (
see [`prepare-and-run-tests.sh` in the tests folder](https://codeberg.org/raffaelj/wordpress-another-simple-image-optimizer/src/branch/main/tests/prepare-and-run-tests.sh)
and search for `enable_svg_avif_upload`).

For more information and notes about development, checkout the [project README.md file on Codeberg](https://codeberg.org/raffaelj/wordpress-another-simple-image-optimizer/src/branch/main/README.md)

### Requirements

 * PHP function `proc_open` must be enabled (some web hosts disable it via `php.
   ini`)

### Settings

Quality settings can be adjusted with constants in `wp-config.php`:

Set quality for resizing images (GD/Imagick)

 * `define('ASIO_RESIZE_QUALITY_JPEG', 100); // default: 82`
 * `define('ASIO_RESIZE_QUALITY_WEBP', 100); // default: 86`

Set quality of optimizers

 * `define('ASIO_QUALITY_JPEGOPTIM', 90); // default: 85`
 * `define('ASIO_QUALITY_PNGQUANT', 90); // default: 85`
 * `define('ASIO_QUALITY_CWEBP', 85); // default: 90`
 * `define('ASIO_QUALITY_AVIFENC', 70); // default: 63`

### Optimization tools

Spatie image-optimizer will use these optimizers if they are present on your system:

 * [JpegOptim](https://github.com/tjko/jpegoptim)
 * [Optipng](http://optipng.sourceforge.net/)
 * [Pngquant 2](https://pngquant.org/)
 * [SVGO 1](https://github.com/svg/svgo)
 * [Gifsicle](http://www.lcdf.org/gifsicle/)
 * [cwebp](https://developers.google.com/speed/webp/docs/precompiled)
 * [avifenc](https://github.com/AOMediaCodec/libavif/blob/main/doc/avifenc.1.md)

At least jpegoptim and optipng should be installed.

You can find information about how to install the binary files in the [Spatie image-optimizer README.md file](https://github.com/spatie/image-optimizer#optimization-tools).

## 评价

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

### 󠀁[Excellent](https://wordpress.org/support/topic/excellent-13005/)󠁿

 [genesisbits](https://profiles.wordpress.org/genesisbits/) 2023 年 9 月 29 日

Fantastic plugin. I was looking to implement spatie/image-optimizer manually on 
my WordPress theme but decided to do one check for a plugin before proceeding. After
having a look through the plugin source code it seems to do exactly what I wanted(
in a cleaner fashion too) without all the unnecessary frills and external API calls
that so many other plugins seem to use. 10/10

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

## 贡献者及开发者

「Another simple image optimizer」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ Raffael Jesche ](https://profiles.wordpress.org/raffaelj/)

「Another simple image optimizer」插件已被翻译至 1 种本地化语言。 感谢[所有译者](https://translate.wordpress.org/projects/wp-plugins/another-simple-image-optimizer/contributors)
为本插件所做的贡献。

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

### 对开发感兴趣吗?

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

## 更新日志

PHP 8.1 is required since 0.2.0.

For more details see [project CHANGELOG.md on Codeberg](https://codeberg.org/raffaelj/wordpress-another-simple-image-optimizer/src/branch/main/CHANGELOG.md)

## 额外信息

 *  版本 **0.3.0**
 *  最后更新：**1 年前**
 *  活跃安装数量 **30+**
 *  WordPress 版本 ** 5.9 或更高版本 **
 *  已测试的最高版本为 **6.7.5**
 *  PHP 版本 ** 8.1 或更高版本 **
 *  语言
 * [English (US)](https://wordpress.org/plugins/another-simple-image-optimizer/)
   和 [German](https://de.wordpress.org/plugins/another-simple-image-optimizer/).
 *  [翻译成简体中文](https://translate.wordpress.org/projects/wp-plugins/another-simple-image-optimizer)
 * 标签
 * [compression](https://cn.wordpress.org/plugins/tags/compression/)[image](https://cn.wordpress.org/plugins/tags/image/)
   [optimization](https://cn.wordpress.org/plugins/tags/optimization/)[optipng](https://cn.wordpress.org/plugins/tags/optipng/)
 *  [高级视图](https://cn.wordpress.org/plugins/another-simple-image-optimizer/advanced/)

## 评级

 5 星（最高 5 星）。

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

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

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

## 贡献者

 *   [ Raffael Jesche ](https://profiles.wordpress.org/raffaelj/)

## 支持

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

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