Title: Image Ninja &#8211; Convert Images to WebP &amp; AVIF on Upload
Author: Nitin Singh
Published: <strong>28 novembris, 2024</strong>
Last modified: 20 septembris, 2026

---

Meklēt spraudņus

![](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

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

[Lejupielādēt](https://downloads.wordpress.org/plugin/image-ninja.1.1.0.zip)

 * [Sīkāka informācija](https://lv.wordpress.org/plugins/image-ninja/#description)
 * [Atsauksmes](https://lv.wordpress.org/plugins/image-ninja/#reviews)
 *  [Uzstādīšana](https://lv.wordpress.org/plugins/image-ninja/#installation)
 * [Attīstība](https://lv.wordpress.org/plugins/image-ninja/#developers)

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

## Apraksts

**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

 * **WebP or AVIF, your choice.** WebP works in all modern browsers. AVIF files 
   are often even smaller. You can also let Image Ninja try AVIF first and use WebP
   when AVIF is not possible.
 * **Adjustable image quality.** One simple setting from 1 to 100, with a sensible
   default of 80.
 * **Accurate colours.** When your server has ImageMagick, colour profiles are kept,
   so photos from professional cameras (Adobe RGB, Display P3) look exactly as intended.
   Camera details and copyright information are kept too.
 * **Photos are never sideways.** Photos taken with a phone held sideways are turned
   the right way up before they are converted.
 * **Removes photo locations (new).** Phones save the exact place where a photo 
   was taken inside the image, which can reveal your home address to anyone who 
   downloads it. Image Ninja removes the location and keeps everything else. On 
   by default.
 * **Only converts when it helps (new).** If a converted image would be bigger than
   the original (this happens with some small icons and simple graphics), your original
   is kept instead. On by default.
 * **Keep your originals if you want (new).** Optionally keep a copy of every original
   JPEG or PNG as a backup, linked from the image details and deleted together with
   the image.
 * **See what happened to every image (new).** The Media Library shows the format,
   how much smaller the image became, and a link to the original. In list view, 
   the “Image Ninja” column shows it at a glance.
 * **Checks your server for you.** The settings page shows which formats your server
   can create and explains in plain words what to ask your hosting provider if something
   is missing.
 * **Lightweight.** No external services, no accounts, no tracking. Everything happens
   on your own server.

#### Which format should I choose?

 * **WebP (recommended):** works in every modern browser and is quick to create.
   Typically 25–35% smaller than JPEG, and often 80–90% smaller than PNG photos.
 * **AVIF (smallest files):** often around half the size of a JPEG. Takes a few 
   seconds per image to create, and very old browsers (for example Safari before
   version 16) cannot show AVIF.
 * **AVIF, or WebP when AVIF is not possible:** tries AVIF first and uses WebP if
   your server cannot create an AVIF or the AVIF would be bigger.

### License

This plugin is licensed under the GPLv2 or later license.

## Ekrānuzņēmumi

[⌊The settings under Settings > Media: choose WebP or AVIF, image quality, and the
privacy and backup options. The summary shows what your server supports.⌉⌊The settings
under Settings > Media: choose WebP or AVIF, image quality, and the privacy and 
backup options. The summary shows what your server supports.⌉[

The settings under Settings > Media: choose WebP or AVIF, image quality, and the
privacy and backup options. The summary shows what your server supports.

[⌊The "Image Ninja" column in the Media Library list view shows the new format and
how much smaller each image became.⌉⌊The "Image Ninja" column in the Media Library
list view shows the new format and how much smaller each image became.⌉[

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 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 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.⌉⌊Image details for a small icon that was kept as PNG, because
converting would have made it bigger.⌉[

Image details for a small icon that was kept as PNG, because converting would have
made it bigger.

## Uzstādīšana

 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.

## BUJ

### 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.

## Atsauksmes

Par šo spraudni nav atsauksmju.

## Autori un izstrādātāji

“Image Ninja – Convert Images to WebP & AVIF on Upload” ir atvērtā pirmkoda programmatūra.
Šo spraudni ir veidojuši šādi cilvēki.

Līdzdalībnieki

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

[Tulkot “Image Ninja – Convert Images to WebP & AVIF on Upload&#8221 savā valodā.](https://translate.wordpress.org/projects/wp-plugins/image-ninja)

### Vai jūs interesē attīstība?

[Pārlūkojiet kodu](https://plugins.trac.wordpress.org/browser/image-ninja/), apmeklējiet
[ SVN krātuvi ](https://plugins.svn.wordpress.org/image-ninja/)vai abonējiet[ attīstības žurnālu](https://plugins.trac.wordpress.org/log/image-ninja/),
ko izveidojis [RSS](https://plugins.trac.wordpress.org/log/image-ninja/?limit=100&mode=stop_on_copy&format=rss).

## Izmaiņu žurnāls

#### 1.1.0

 * New: Removes photo locations (GPS) from converted images and kept originals, 
   keeping camera details, copyright and colour profiles. On by default.
 * New: Only converts an image when it gets smaller; otherwise the original is kept.
   On by default.
 * New: Option to keep a copy of the original JPEG or PNG, linked from the image
   details and deleted with the image.
 * New: The Media Library shows what happened to each image (attachment details 
   and an “Image Ninja” column in list view): new format, image library used, size
   before and after, location removed, and a link to the original.
 * New: The settings page shows which formats your server supports and explains 
   what to ask your hosting provider if something is missing.
 * Improved: Conversion now uses the WordPress image tools and prefers ImageMagick,
   keeping colour profiles and camera details. GD is used when ImageMagick is not
   available or cannot create a format.
 * Improved: With “AVIF, or WebP when AVIF is not possible”, a WebP from ImageMagick
   is preferred over an AVIF from GD, so colours stay accurate.
 * Improved: Faster AVIF conversion with ImageMagick.
 * Improved: Settings rewritten in plain language. Formats your server cannot create
   are shown as unavailable instead of hidden.
 * Fix: The FAQ said original files were kept, but they were replaced. Originals
   can now be kept with the new option.
 * Fix: Photos taken with a phone held sideways are no longer shown sideways after
   conversion.
 * Fix: Uploading an 8-bit (palette) PNG no longer causes a fatal error with WebP
   conversion.
 * Fix: Saving the Media settings no longer switches conversion off when the saved
   format became unavailable on the server.
 * Fix: The “conversion not available” warning is shown on the Media settings page
   only, instead of on every admin page.
 * Fix: The file type is detected from the image itself instead of the name the 
   browser reports.
 * Fix: Conversion details are written to the debug log when `WP_DEBUG_LOG` is enabled.
 * Removed manual translation loading; WordPress.org loads translations automatically.
 * Requires WordPress 6.5 or later.

#### 1.0.1

 * Tested with WordPress 6.8.

#### 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.

## Meta

 *  Versija **1.1.0**
 *  Pēdējo reizi atjaunots: **pirms 5 dienām**
 *  Aktīvās instalācijas: **60+**
 *  WordPress versija ** 6.5 vai jaunāka **
 *  Pārbaudīts līdz: **7.1.2**
 *  PHP versija ** 7.2 vai jaunāka **
 *  Valoda
 * [English (US)](https://wordpress.org/plugins/image-ninja/)
 * Birkas:
 * [AVIF](https://lv.wordpress.org/plugins/tags/avif/)[compress images](https://lv.wordpress.org/plugins/tags/compress-images/)
   [convert images](https://lv.wordpress.org/plugins/tags/convert-images/)[image optimization](https://lv.wordpress.org/plugins/tags/image-optimization/)
   [webp](https://lv.wordpress.org/plugins/tags/webp/)
 *  [Papildu skats](https://lv.wordpress.org/plugins/image-ninja/advanced/)

## Vērtējumi

Vēl nav iesniegta neviena atsauksme.

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

[Skatīt visasatsauksmes](https://wordpress.org/support/plugin/image-ninja/reviews/)

## Līdzdalībnieki

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

## Atbalsts

Pēdējo divu mēnešu laikā atrisinātās problēmas:

     0 no 1

 [Skatīt atbalsta forumu](https://wordpress.org/support/plugin/image-ninja/)

## Ziedojiet

Vai vēlaties atbalstīt šī spraudņa pilnveidošanu?

 [ Ziedojiet šim spraudnim ](https://paypal.me/nitinkrsing)