Linux 软件免费装
Banner图

Image Ninja - Convert Images to WebP & AVIF on Upload

开发者 nitinkrsing
更新时间 2026年9月20日 08:24
捐献地址: 去捐款
PHP版本: 7.2 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

compress images webp image optimization avif convert images

下载

1.0 1.0.1 1.1.0

详情介绍:

Image Ninja makes your website faster by turning the images you upload into smaller, modern WebP or AVIF files. No coding, no extra steps: upload your images as usual and Image Ninja does the rest. Images are usually the heaviest part of a web page. WebP and AVIF look the same as JPEG and PNG but are much smaller, so your pages load faster, especially on phones and slow connections. Faster pages also help with search rankings (Core Web Vitals). How it works
  1. Choose a format under Settings > Media. WebP is recommended.
  2. Upload images the way you always do: in the Media Library, the block editor, or your page builder.
  3. Image Ninja converts each JPEG or PNG before WordPress saves it. Your Media Library, your theme, and your page builder simply use the smaller WebP or AVIF image, like any other image.
Because the image is converted at upload, it works with every theme and page builder, and there is nothing to set up on your server. Features Which format should I choose?

安装:

  1. In your WordPress dashboard, go to Plugins > Add New, search for "Image Ninja", then click Install Now and Activate.
  2. Go to Settings > Media and scroll down to Image Ninja: WebP & AVIF Conversion.
  3. Choose a format under Convert uploads to. WebP is the safe choice for most websites.
  4. Click Save Changes. From now on, every JPEG and PNG you upload is converted.
The other settings have recommended defaults, so you do not need to change them.

屏幕截图:

  • The "Image Ninja" column in the Media Library list view shows the new format and how much smaller each image became.
  • Image details for a converted photo: converted to WebP with ImageMagick, the size before and after, location data removed, and a link to the kept original.
  • Image details for a small icon that was kept as PNG, because converting would have made it bigger.

升级注意事项:

1.1.0 Keeps colours accurate, removes photo locations, never makes images bigger, fixes sideways photos and a crash with some PNGs, adds an option to keep originals, and shows the result for every image in the Media Library.

常见问题:

Does Image Ninja convert the images already in my Media Library?

No. Only images you upload after choosing a format are converted. Images already in your Media Library are not changed.

Will my pages, theme and page builder show the converted images?

Yes. The uploaded image itself is saved as WebP or AVIF, so WordPress, your theme and page builders such as Elementor, Divi, Beaver Builder, Bricks, Breakdance, Oxygen and WPBakery use it like any other image. There is nothing to configure.

Are my original JPEG and PNG files kept?

Not by default: the converted image replaces the upload, which saves disk space. To keep them, go to Settings > Media and tick Also keep a copy of the original JPEG or PNG under Original files. Each original is then saved next to its converted image (for example photo.jpg next to photo.webp), linked in the image details in the Media Library, and deleted when you delete the image. This applies to images uploaded after you switch it on.

Why is one of my images still a JPEG or PNG?

Open the image in the Media Library to see the reason, or switch to list view and check the Image Ninja column. Usually the converted image would have been bigger than the original, which happens with some small icons and simple graphics, so the original was kept. Images uploaded before you installed Image Ninja, or while conversion was switched off, are shown as "Not processed".

Is location (GPS) data removed from photos?

Yes, by default. Photos from phones and many cameras contain the exact place where they were taken, and anyone who downloads the image from your website can read it. Image Ninja removes the location from converted images, from kept originals, and from JPEG photos that are not converted, without changing how they look. Camera details, copyright and colour profiles are kept. You can switch this off under Photo location in Settings > Media.

Will the colours of my photos change?

Not when your server has ImageMagick (the PHP "Imagick" extension), which most hosting providers offer. Image Ninja then keeps the colour profile, so photos from professional cameras (Adobe RGB, Display P3) look exactly the same. If your server only has the basic GD library, colour profiles cannot be kept, and colours in some professional photos may look slightly less vivid. Everyday photos from phones are not noticeably affected. Settings > Media shows which library your server has.

Which image quality should I use?

80 (the default) is a good balance for most websites, and 70 gives smaller files. Higher numbers mean sharper images but bigger files. Settings above 85 rarely look better, and can make a converted photo bigger than the original JPEG. When that happens and "Only convert an image if it gets smaller" is on, the JPEG is kept.

Which images are converted?

JPEG and PNG images uploaded through the Media Library, the block editor, the classic editor and page builders. Transparent PNGs keep their transparency. GIF, SVG and images that are already WebP or AVIF are left as they are. Images that other plugins import from a web address are not converted.

Does it work on shared hosting? What does my server need?

Image Ninja uses the image tools built into WordPress, so it works on most hosting. WebP needs ImageMagick or GD with WebP support, which almost every host has. AVIF needs ImageMagick with AVIF support or PHP 8.1+ with GD AVIF support. The Image Ninja section in Settings > Media shows what your server supports, and explains what to ask your hosting provider if something is missing. Formats your server cannot create are shown as unavailable.

Does converting slow down uploads?

WebP conversion takes a fraction of a second per image. AVIF takes a few seconds per image, depending on its size and your server. Each image is converted only once, when you upload it; your visitors never wait for it.

What happens if I deactivate or delete the plugin?

Images that were already converted stay WebP or AVIF and keep working. New uploads are no longer converted. Deleting the plugin removes its settings; kept original files are left in place.

Something went wrong. Where can I find more details?

The Media Library shows the result for every image. For technical details, enable WP_DEBUG_LOG in wp-config.php: Image Ninja then writes a line for each image to wp-content/debug.log, including which image library was used and the file sizes. Please include these lines when asking for help in the support forum.

更新日志:

1.1.0 1.0.1 1.0.0