Title: WebP WASM
Author: gecko43
Published: <strong>2020 年 6 月 19 日</strong>
Last modified: 2020 年 6 月 19 日

---

搜尋外掛

![](https://ps.w.org/webp-wasm/assets/banner-772x250.png?rev=2327719)

這個外掛**並未在最新的 3 個 WordPress 主要版本上進行測試**。開發者可能不再對這個
外掛進行維護或提供技術支援，並可能會與更新版本的 WordPress 產生使用上的相容性問題。

![](https://ps.w.org/webp-wasm/assets/icon-256x256.png?rev=2327719)

# WebP WASM

 由 [gecko43](https://profiles.wordpress.org/gecko43/) 開發

[下載](https://downloads.wordpress.org/plugin/webp-wasm.zip)

 * [詳細資料](https://tw.wordpress.org/plugins/webp-wasm/#description)
 * [使用者評論](https://tw.wordpress.org/plugins/webp-wasm/#reviews)
 * [開發資訊](https://tw.wordpress.org/plugins/webp-wasm/#developers)

 [技術支援](https://wordpress.org/support/plugin/webp-wasm/)

## 外掛說明

Convert jpeg and png images to their webp equivalents by leveraging google’s libwebp
and web assembly and serve webp images directly when supported in posts and pages.

### Quick start

 * Sign into the backoffice as an admin user.
 * Install the plugin and activate it.

### Convert a single media library image

 * Navigate to **Media > Library**
 * Select the **list view** icon
 * Locate a jpeg or png image for editing and click the media’s title link or the“
   edit” link under the entry.
 * Scroll down to the bottom of the edit page to the (new) _WebP Conversion_ section
 * Click **Create** to create a webp version of this media library image on the 
   server
 * Click **Delete** to delete a webp version if it exists for this media library
   image

### Convert all media library images

 * Navigate to **Plugins**
 * Set the quality and overwrite flag as desired
 * Click **Create** to create webp files for all media library images
 * Click **Delete** to delete existing webp files for all media library images

### How it works

The client (browser) creates a webp version of the image when the **Create** button
is clicked. This is then sent to the server where it is saved in the same folder
as the original image, but with a `.webp` extension.

For example, if the original image is

    ```
    /wp-content/uploads/2020/05/test.jpg
    ```

an additional

    ```
    /wp-content/uploads/2020/05/test.webp
    ```

will be created there.

A filter is applied in the WordPress hook `the_content` to swap an image for its
webp equivalent if available.

### More about the conversion

Conversion is done on the client, so a modern browser with wasm support is needed.
This is because conversion to webp with php requires shell_exec to make calls to
Google’s cwebp or other php extensions are needed. These features often pose security
risks that outweigh the benefits. This plugin gets around that by delegating the
actual image conversion to the client. It’s based on [this encoder](https://github.com/wrburnham/webp-wasm)
to save webp versions of uploaded jpeg and png images.

### License

This plugin is licensed as GPLv3.

### Notes

The simple html dom parser library is used to render webp images directly in WordPress
content where possible. The client-side conversion to WebP leverages Google’s libwebp.

## 螢幕擷圖

[⌊Access the admin panel from the Tools menu.⌉⌊Access the admin panel from the Tools
menu.⌉[

Access the admin panel from the **Tools** menu.

[⌊The admin panel for global (site-wide) conversion of images to WebP. A similar
panel is available for individual media library images; to access this for an individual
media resource, use the Edit link for the specific Media > Library resource.⌉⌊The
admin panel for global (site-wide) conversion of images to WebP. A similar panel
is available for individual media library images; to access this for an individual
media resource, use the Edit link for the specific Media > Library resource.⌉[

The admin panel for global (site-wide) conversion of images to WebP. A similar panel
is available for individual media library images; to access this for an individual
media resource, use the **Edit** link for the specific **Media** > **Library** resource.

## 使用者評論

這個外掛目前沒有任何使用者評論。

## 參與者及開發者

以下人員參與了開源軟體〈WebP WASM〉的開發相關工作。

參與者

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

[將〈WebP WASM〉外掛本地化為台灣繁體中文版](https://translate.wordpress.org/projects/wp-plugins/webp-wasm)

### 對開發相關資訊感興趣？

任何人均可[瀏覽程式碼](https://plugins.trac.wordpress.org/browser/webp-wasm/)、查看
[SVN 存放庫](https://plugins.svn.wordpress.org/webp-wasm/)，或透過 [RSS](https://plugins.trac.wordpress.org/log/webp-wasm/?limit=100&mode=stop_on_copy&format=rss)
訂閱[開發記錄](https://plugins.trac.wordpress.org/log/webp-wasm/)。

## 變更記錄

First release

## 中繼資料

 *  版本 **1.0**
 *  最後更新 **6 年前**
 *  啟用安裝數 **10+**
 *  已測試相容的 WordPress 版本 **5.4.23**
 *  語言
 * [English (US)](https://wordpress.org/plugins/webp-wasm/)
 * 標籤:
 * [image](https://tw.wordpress.org/plugins/tags/image/)[webp](https://tw.wordpress.org/plugins/tags/webp/)
 *  [進階檢視](https://tw.wordpress.org/plugins/webp-wasm/advanced/)

## 評分

這個項目尚無任何評論記錄。

[撰寫評分](https://wordpress.org/support/plugin/webp-wasm/reviews/#new-post)

[查看全部使用者評論](https://wordpress.org/support/plugin/webp-wasm/reviews/)

## 參與者

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

## 技術支援

使用者可在技術支援論壇提出意見反應或使用問題。

 [檢視技術支援論壇](https://wordpress.org/support/plugin/webp-wasm/)