Title: Patu Optimizer – Compress Images to WebP &amp; AVIF
Author: gheop
Published: <strong>2026 年 7 月 23 日</strong>
Last modified: 2026 年 8 月 13 日

---

搜索插件

![](https://ps.w.org/patu-optimizer/assets/banner-772x250.png?rev=3620367)

![](https://ps.w.org/patu-optimizer/assets/icon.svg?rev=3620367)

# Patu Optimizer – Compress Images to WebP & AVIF

 作者：[gheop](https://profiles.wordpress.org/gheop/)

[下载](https://downloads.wordpress.org/plugin/patu-optimizer.0.2.1.zip)

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

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

## 描述

Patu shrinks the images in your WordPress media library by re-encoding them
 through
the [Patu](https://patu.dev) optimization API. It works in place and keeps the same
format and dimensions, so your URLs never change and it works with every theme and
page builder.

 * **Automatic**: new uploads are optimized as they come in, across every
    generated
   size (thumbnail, medium, large, full).
 * **Bulk**: optimize your entire existing library from one screen, with a live
   
   progress bar.
 * **Safe**: a file is only replaced when the optimized version is strictly
    smaller(
   never bigger), a failed optimization never blocks an upload or breaks your site(
   never broken), and originals are backed up so you can restore any image with 
   one click.
 * **Private**: your API key is only ever sent to patu.dev in a request header.

Get a free API key at [patu.dev](https://patu.dev).

**Two modes:**

 * **Optimize in place** (default): re-encodes JPEG and WebP images to a smaller
   
   version of the same format. URLs never change, so it works with every theme and
   page builder. JPEG is the bulk of most libraries’ weight, and this saves roughly
   a quarter of its size with no visible quality change.
 * **Serve next-gen formats** (AVIF/WebP): generates modern versions of your
    images(
   JPEG, PNG and WebP) and serves them through a `<picture>` tag, keeping the original
   as a fallback for older browsers. The biggest savings, and it covers PNG too.

### External service

This plugin relies on the Patu image-optimization API to do the actual
 compression.
It is the core function of the plugin and it cannot work without it.

 * **What is sent, and when:** the image files you optimize (on upload if
    auto-
   optimize is on, or when you run a bulk optimize / next-gen generate), plus your
   API key in the `X-Api-Key` header. A small built-in sample image is also sent
   when you click “Test connection”. Everything goes over HTTPS to https://patu.
   dev.
 * **What comes back:** the optimized image bytes. Nothing else about your site
   (
   its content, users, or any personal data) is sent, only the image itself.

The service is operated by Patu (https://patu.dev). By using it you agree to its

terms and privacy policy:

 * Terms of service: https://patu.dev/terms
 * Privacy policy: https://patu.dev/privacy

## 屏幕截图

[⌊Your media library, with the space saved on every image shown in the Patu column.⌉⌊
Your media library, with the space saved on every image shown in the Patu column
.⌉[

Your media library, with the space saved on every image shown in the Patu column.

[⌊One-click bulk optimize, with a live progress bar and the saving for each file.⌉⌊
One-click bulk optimize, with a live progress bar and the saving for each file.⌉[

One-click bulk optimize, with a live progress bar and the saving for each file.

[⌊Settings: paste your API key, choose in-place or next-gen delivery, and keep a
backup of every original.⌉⌊Settings: paste your API key, choose in-place or next-
gen delivery, and keep a backup of every original.⌉[

Settings: paste your API key, choose in-place or next-gen delivery, and keep a backup
of every original.

## 安装

 1. Upload the `patu-optimizer` folder to `/wp-content/plugins/`, or install the plugin
    through the Plugins screen.
 2. Activate it through the Plugins screen.
 3. Go to **Patu  Settings**, paste your API key from [patu.dev](https://patu.dev),
    and click **Test connection**.
 4. New uploads are optimized automatically. To optimize existing images, open **Patu
    Bulk Optimize** and click **Optimize all**.

You can also set the key in `wp-config.php` instead of the database:

    ```
    define( 'PATU_API_KEY', 'your_key_here' );
    ```

## 常见问题

### Does it change my image URLs?

No. v1 optimizes JPEG and WebP in place, keeping the same file, format and
 dimensions,
so every URL stays exactly as it was.

### Can I undo it?

Yes. Keep “Keep originals” on (the default) and every optimized image can be
 restored
to its exact original from the media library or the Bulk Optimize screen.

### Will it ever make a file bigger or break an image?

No. A file is only replaced when the optimized version is strictly smaller, the

write is atomic, and any API or network error is skipped without touching the original
or interrupting your upload.

### What about PNG, and AVIF/WebP delivery?

Switch to the “Serve next-gen formats” mode. It generates AVIF (and WebP)
 versions
of your JPEG, PNG and WebP images and serves them through a `<picture>` tag, with
the original kept as a fallback. GIF is not covered yet.

### Where does my API key go?

Only to patu.dev, and only in the `X-Api-Key` request header. It is never
 logged;
on the settings page only an administrator can see it, in a masked password field.

## 评价

此插件暂无评价。

## 贡献者及开发者

「Patu Optimizer – Compress Images to WebP & AVIF」是开源软件。 以下人员对此插件
做出了贡献。

贡献者

 *   [ gheop ](https://profiles.wordpress.org/gheop/)

「Patu Optimizer – Compress Images to WebP & AVIF」插件已被翻译至 3 种本地化语言。
感谢[所有译者](https://translate.wordpress.org/projects/wp-plugins/patu-optimizer/contributors)
为本插件所做的贡献。

[帮助将「Patu Optimizer – Compress Images to WebP & AVIF」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/patu-optimizer)

### 对开发感兴趣吗?

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

## 更新日志

#### 0.2.1

 * Listing metadata only, no functional change: clearer title and description that
   surface WebP and AVIF, refreshed search tags, and tested up to WordPress 7.0.

#### 0.2.0

 * New “Serve next-gen formats” mode: generates AVIF (and WebP) versions of your
   images and serves them through a tag, keeping the original as a fallback. Covers
   PNG too. The in-place mode stays the default.
 * All file operations now go through WP_Filesystem.
 * Licensed GPLv2 or later.

#### 0.1.0

 * First release: in-place JPEG and WebP optimization, optimize-on-upload, bulk
   
   optimize with progress, per-image and bulk restore, media library column, settings
   with a connection test, and stats.

## 额外信息

 *  版本 **0.2.1**
 *  最后更新：**1 月前**
 *  活跃安装数量 **不到10**
 *  WordPress 版本 ** 6.0 或更高版本 **
 *  已测试的最高版本为 **7.1.2**
 *  PHP 版本 ** 7.4 或更高版本 **
 *  语言
 * [English (US)](https://wordpress.org/plugins/patu-optimizer/) 、 [German](https://de.wordpress.org/plugins/patu-optimizer/)、
   [Spanish (Chile)](https://cl.wordpress.org/plugins/patu-optimizer/) 和 [Spanish (Spain)](https://es.wordpress.org/plugins/patu-optimizer/).
 *  [翻译成简体中文](https://translate.wordpress.org/projects/wp-plugins/patu-optimizer)
 * 标签
 * [AVIF](https://cn.wordpress.org/plugins/tags/avif/)[compress images](https://cn.wordpress.org/plugins/tags/compress-images/)
   [image optimization](https://cn.wordpress.org/plugins/tags/image-optimization/)
   [optimize images](https://cn.wordpress.org/plugins/tags/optimize-images/)[webp](https://cn.wordpress.org/plugins/tags/webp/)
 *  [高级视图](https://cn.wordpress.org/plugins/patu-optimizer/advanced/)

## 评级

尚未提交反馈。

[您的评价](https://wordpress.org/support/plugin/patu-optimizer/reviews/#new-post)

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

## 贡献者

 *   [ gheop ](https://profiles.wordpress.org/gheop/)

## 支持

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

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