Title: WP WebPNative
Author: alexalouit
Published: <strong>2020 年 3 月 28 日</strong>
Last modified: 2020 年 3 月 28 日

---

搜索插件

![](https://ps.w.org/wp-webpnative/assets/banner-772x250.png?rev=2269889)

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

![](https://ps.w.org/wp-webpnative/assets/icon-256x256.jpg?rev=2269889)

# WP WebPNative

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

[下载](https://downloads.wordpress.org/plugin/wp-webpnative.zip)

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

 [支持](https://wordpress.org/support/plugin/wp-webpnative/)

## 描述

This module provide a reliable webp solution, without configuration.
 Supported 
file formats are JPEG and PNG up to 8 megabytes.

Module look for compatible media images, sends them to an API which is convert them.

They are saved next to the original file. When a visitor is on your site, “HTML 
Transformation” function take care to provide the WebP version. This function can
be disabled because some web server takes care of presenting the file themselves.

## 屏幕截图

 * [[
 * Exemple
 * [[
 * General configure

## 安装

The installation is like any other plugin:

Automatic installation:
 Install it from WordPress plugins repository, activate 
it.

Manual installation:
 Unzip files under /wp-content/plugins directory, activate 
it.

Automatic uninstallation:
 Use WordPress built-in extension manager.

Manual uninstallation:
 – remove plugin directory /wp-content/plugins/wp-webpnative

## 常见问题

  Does it support non-WebP browser like Safari?

Yes, this is supported when using the html transformation function.

  Does I need a PHP specific module?

No, you don’t.
 The compression is done on several remote servers.

  What is HTML modification?

This is the process of modifying the final HTML content of your page,
 it will verify
that the images are available in WebP format so that the client is WebP compatible.
If these last two cases are valid, the content will be update to present the image
in WebP format.

  How use Apache rule

Disable HTML transformation on module configuration page

_add to .htaccess:_

    ```
    <IfModule mod_setenvif.c>
      SetEnvIf Request_URI "\.(jpe?g|png)$" REQUEST_image
    </IfModule>

    <IfModule mod_rewrite.c>
      RewriteEngine On
      RewriteCond %{HTTP_ACCEPT} image/webp
      RewriteCond %{DOCUMENT_ROOT}/$1.webp -f
      RewriteRule (.+)\.(jpe?g|png)$ $1.webp [T=image/webp]
    </IfModule>

    <IfModule mod_headers.c>
      Header append Vary Accept env=REQUEST_image
    </IfModule>

    <IfModule mod_mime.c>
      AddType image/webp .webp
    </IfModule>
    ```

  How use Nginx rule

Disable HTML transformation on module configuration page

_Add to /etc/nginx/conf.d/webp.conf:_

    ```
    map $http_accept $webp_suffix {
      default "";
      "~*webp" ".webp";
    }
    ```

_Add to your vhost file:_

    ```
    location ~ \.(png|jpe?g)$ {
      add_header Vary "Accept-Encoding";
      try_files $uri$webp_suffix $uri =404;
    }
    ```

## 评价

此插件暂无评价。

## 贡献者及开发者

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

贡献者

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

[帮助将「WP WebPNative」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/wp-webpnative)

### 对开发感兴趣吗?

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

## 更新日志

#### 1.0

 * Initial version

## 额外信息

 *  版本 **1.0**
 *  最后更新：**6 年前**
 *  活跃安装数量 **10+**
 *  WordPress 版本 ** 3.0.1 或更高版本 **
 *  已测试的最高版本为 **5.3.21**
 *  PHP 版本 ** 5.2.4 或更高版本 **
 *  语言
 * [English (US)](https://wordpress.org/plugins/wp-webpnative/)
 * 标签
 * [image](https://cn.wordpress.org/plugins/tags/image/)[performance](https://cn.wordpress.org/plugins/tags/performance/)
   [speed](https://cn.wordpress.org/plugins/tags/speed/)[webp](https://cn.wordpress.org/plugins/tags/webp/)
 *  [高级视图](https://cn.wordpress.org/plugins/wp-webpnative/advanced/)

## 评级

尚未提交反馈。

[Your review](https://wordpress.org/support/plugin/wp-webpnative/reviews/#new-post)

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

## 贡献者

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

## 支持

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

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

## 捐助

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

 [ 捐助此插件 ](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=4GJGDY4J4PRXS)