Title: Image Ninja &#8211; Convert Images to WebP &amp; AVIF on Upload
Author: Nitin Singh
Published: <strong>2024 年 11 月 28 日</strong>
Last modified: 2025 年 5 月 24 日

---

搜索插件

![](https://ps.w.org/image-ninja/assets/banner-772x250.png?rev=3198755)

![](https://ps.w.org/image-ninja/assets/icon-256x256.png?rev=3198755)

# Image Ninja – Convert Images to WebP & AVIF on Upload

 作者：[Nitin Singh](https://profiles.wordpress.org/nitinkrsing/)

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

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

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

## 描述

**Image Ninja – Convert Images to WebP & AVIF on Upload** is a lightweight WordPress
plugin that automatically converts JPEG and PNG images to modern WebP and AVIF formats
upon upload. The plugin improves website performance by optimizing image file sizes
without compromising quality, leading to faster page loading times.

### Key Features

 * Automatically converts JPEG and PNG images to WebP and AVIF formats during upload.
 * Allows configuration of WebP and AVIF image quality in the settings.
 * Enhances website performance by reducing image file sizes.
 * Simple settings interface under `Settings > Media` for easy customization.
 * Lightweight and developer-friendly codebase.

This plugin is ideal for website owners looking to improve load times and optimize
image delivery, especially on mobile devices and slow connections.

### Why WebP?

WebP is a modern image format developed by Google that provides both lossy and lossless
compression for images on the web. Here are some benefits of using WebP:

 * **Smaller File Size**: WebP images can be up to 30% smaller than JPEGs and PNGs
   with no noticeable loss in quality, resulting in faster page load times.
 * **Transparency and Animation**: WebP supports transparent backgrounds like PNG
   and animated images like GIF, making it a versatile choice.
 * **Improved Compression**: WebP offers better compression algorithms compared 
   to traditional formats, allowing for high-quality images with lower storage requirements.

### Why AVIF?

AVIF (AV1 Image File Format) is a cutting-edge image format derived from the AV1
video codec, offering even better compression than WebP. Here’s why AVIF is beneficial:

 * **High Compression Efficiency**: AVIF can reduce image sizes by up to 50% compared
   to JPEG, while maintaining similar or even higher visual quality.
 * **HDR Support**: AVIF supports High Dynamic Range (HDR), allowing for more vibrant
   and detailed images, especially on modern displays.
 * **Advanced Features**: It includes support for transparency, animation, and a
   wider color gamut, making it suitable for various types of web content.

### License

This plugin is licensed under the GPLv2 or later license.

## 屏幕截图

 * [[
 * **Settings page**: Configure the quality settings for WebP and AVIF formats.
 * [[
 * **Image Upload Example**: The original image uploaded, with automatically generated
   WebP and AVIF versions.

## 安装

 1. Upload the plugin files to the `/wp-content/plugins/image-ninja` directory, or 
    install the plugin through the WordPress plugins screen directly.
 2. Activate the plugin through the ‘Plugins’ screen in WordPress.
 3. Navigate to `Settings > Media` to choose the image format and configure the image
    quality settings for WebP and AVIF formats.

## 常见问题

### Why should I use WebP and AVIF image formats?

WebP and AVIF are modern image formats that offer superior compression compared 
to traditional JPEG and PNG formats, resulting in smaller file sizes and faster 
loading times without noticeable quality loss.

### Will my original images be replaced?

No, the original JPEG or PNG images remain in the media library. The plugin creates
additional WebP and AVIF versions that can be used by other optimization plugins
or custom themes.

### Does this plugin work on shared hosting?

Yes, the plugin should work on most shared hosting environments. However, AVIF support
requires a server with the appropriate library installed (e.g., `libavif`). If AVIF
conversion is unavailable, the plugin will still convert images to WebP.

## 评价

此插件暂无评价。

## 贡献者及开发者

「Image Ninja – Convert Images to WebP & AVIF on Upload」是开源软件。 以下人员对
此插件做出了贡献。

贡献者

 *   [ Nitin Singh ](https://profiles.wordpress.org/nitinkrsing/)

[帮助将「Image Ninja – Convert Images to WebP & AVIF on Upload」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/image-ninja)

### 对开发感兴趣吗?

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

## 更新日志

#### 1.0.0

 * Initial release.
 * Convert JPEG and PNG images to WebP and AVIF formats during upload.
 * Added settings for adjusting the quality of WebP and AVIF conversions.

## 额外信息

 *  版本 **1.0.1**
 *  最后更新：**1 年前**
 *  活跃安装数量 **50+**
 *  WordPress 版本 ** 5.0 或更高版本 **
 *  已测试的最高版本为 **6.8.5**
 *  PHP 版本 ** 7.2 或更高版本 **
 *  语言
 * [English (US)](https://wordpress.org/plugins/image-ninja/)
 * 标签
 * [AVIF](https://cn.wordpress.org/plugins/tags/avif/)[image conversion](https://cn.wordpress.org/plugins/tags/image-conversion/)
   [media](https://cn.wordpress.org/plugins/tags/media/)[optimize images](https://cn.wordpress.org/plugins/tags/optimize-images/)
   [webp](https://cn.wordpress.org/plugins/tags/webp/)
 *  [高级视图](https://cn.wordpress.org/plugins/image-ninja/advanced/)

## 评级

尚未提交反馈。

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

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

## 贡献者

 *   [ Nitin Singh ](https://profiles.wordpress.org/nitinkrsing/)

## 支持

最近两个月解决的问题：

     总计 1，已解决 0

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

## 捐助

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

 [ 捐助此插件 ](https://paypal.me/nitinkrsing)