{"id":210808,"date":"2024-11-28T10:27:57","date_gmt":"2024-11-28T10:27:57","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/image-ninja-convert-images-to-webp-avif-on-upload\/"},"modified":"2026-09-20T00:24:20","modified_gmt":"2026-09-20T00:24:20","slug":"image-ninja","status":"publish","type":"plugin","link":"https:\/\/bho.wordpress.org\/plugins\/image-ninja\/","author":18244831,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.1.0","stable_tag":"1.1.0","tested":"7.1.1","requires":"6.5","requires_php":"7.2","requires_plugins":null,"header_name":"Image Ninja - Convert Images to WebP & AVIF on Upload","header_author":"Nitin Singh","header_description":"Automatically converts JPEG and PNG images to WebP and AVIF formats during upload.","assets_banners_color":"919191","last_updated":"2026-09-20 00:24:20","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/paypal.me\/nitinkrsing","header_plugin_uri":"https:\/\/singhnitin.com\/plugins\/image-ninja","header_author_uri":"https:\/\/singhnitin.com","rating":0,"author_block_rating":0,"active_installs":50,"downloads":1662,"num_ratings":0,"support_threads":1,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0":{"tag":"1.0","author":"nitinkrsing","date":"2024-11-28 10:27:21","revision":3198755},"1.0.1":{"tag":"1.0.1","author":"nitinkrsing","date":"2026-06-13 18:03:29","revision":3571240},"1.1.0":{"tag":"1.1.0","author":"nitinkrsing","date":"2026-09-20 00:24:20","revision":3703749}},"upgrade_notice":{"1.1.0":"<p>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.<\/p>"},"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3198755,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3198755,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3198755,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3198755,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0","1.0.1","1.1.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3703746,"resolution":"1","location":"assets","locale":"","width":1176,"height":559},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3703746,"resolution":"2","location":"assets","locale":"","width":1176,"height":559},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3703746,"resolution":"3","location":"assets","locale":"","width":1176,"height":559},"screenshot-4.png":{"filename":"screenshot-4.png","revision":3703746,"resolution":"4","location":"assets","locale":"","width":1176,"height":559}},"screenshots":{"1":"The settings under Settings &gt; Media: choose WebP or AVIF, image quality, and the privacy and backup options. The summary shows what your server supports.","2":"The \"Image Ninja\" column in the Media Library list view shows the new format and how much smaller each image became.","3":"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.","4":"Image details for a small icon that was kept as PNG, because converting would have made it bigger."}},"plugin_section":[],"plugin_tags":[194661,56174,232939,29161,15376],"plugin_category":[50],"plugin_contributors":[235177],"plugin_business_model":[],"class_list":["post-210808","plugin","type-plugin","status-publish","hentry","plugin_tags-avif","plugin_tags-compress-images","plugin_tags-convert-images","plugin_tags-image-optimization","plugin_tags-webp","plugin_category-media","plugin_contributors-nitinkrsing","plugin_committers-nitinkrsing"],"banners":{"banner":"https:\/\/ps.w.org\/image-ninja\/assets\/banner-772x250.png?rev=3198755","banner_2x":"https:\/\/ps.w.org\/image-ninja\/assets\/banner-1544x500.png?rev=3198755","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/image-ninja\/assets\/icon-128x128.png?rev=3198755","icon_2x":"https:\/\/ps.w.org\/image-ninja\/assets\/icon-256x256.png?rev=3198755","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/image-ninja\/assets\/screenshot-1.png?rev=3703746","caption":"The settings under Settings &gt; Media: choose WebP or AVIF, image quality, and the privacy and backup options. The summary shows what your server supports."},{"src":"https:\/\/ps.w.org\/image-ninja\/assets\/screenshot-2.png?rev=3703746","caption":"The \"Image Ninja\" column in the Media Library list view shows the new format and how much smaller each image became."},{"src":"https:\/\/ps.w.org\/image-ninja\/assets\/screenshot-3.png?rev=3703746","caption":"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."},{"src":"https:\/\/ps.w.org\/image-ninja\/assets\/screenshot-4.png?rev=3703746","caption":"Image details for a small icon that was kept as PNG, because converting would have made it bigger."}],"raw_content":"<!--section=description-->\n<p><strong>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.<\/strong><\/p>\n\n<p>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).<\/p>\n\n<h4>How it works<\/h4>\n\n<ol>\n<li>Choose a format under <code>Settings &gt; Media<\/code>. WebP is recommended.<\/li>\n<li>Upload images the way you always do: in the Media Library, the block editor, or your page builder.<\/li>\n<li>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.<\/li>\n<\/ol>\n\n<p>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.<\/p>\n\n<h4>Features<\/h4>\n\n<ul>\n<li><strong>WebP or AVIF, your choice.<\/strong> 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.<\/li>\n<li><strong>Adjustable image quality.<\/strong> One simple setting from 1 to 100, with a sensible default of 80.<\/li>\n<li><strong>Accurate colours.<\/strong> 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.<\/li>\n<li><strong>Photos are never sideways.<\/strong> Photos taken with a phone held sideways are turned the right way up before they are converted.<\/li>\n<li><strong>Removes photo locations (new).<\/strong> 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.<\/li>\n<li><strong>Only converts when it helps (new).<\/strong> 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.<\/li>\n<li><strong>Keep your originals if you want (new).<\/strong> Optionally keep a copy of every original JPEG or PNG as a backup, linked from the image details and deleted together with the image.<\/li>\n<li><strong>See what happened to every image (new).<\/strong> 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.<\/li>\n<li><strong>Checks your server for you.<\/strong> 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.<\/li>\n<li><strong>Lightweight.<\/strong> No external services, no accounts, no tracking. Everything happens on your own server.<\/li>\n<\/ul>\n\n<h4>Which format should I choose?<\/h4>\n\n<ul>\n<li><strong>WebP (recommended):<\/strong> works in every modern browser and is quick to create. Typically 25\u201335% smaller than JPEG, and often 80\u201390% smaller than PNG photos.<\/li>\n<li><strong>AVIF (smallest files):<\/strong> 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.<\/li>\n<li><strong>AVIF, or WebP when AVIF is not possible:<\/strong> tries AVIF first and uses WebP if your server cannot create an AVIF or the AVIF would be bigger.<\/li>\n<\/ul>\n\n<h3>License<\/h3>\n\n<p>This plugin is licensed under the GPLv2 or later license.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>In your WordPress dashboard, go to <code>Plugins &gt; Add New<\/code>, search for \"Image Ninja\", then click <strong>Install Now<\/strong> and <strong>Activate<\/strong>.<\/li>\n<li>Go to <code>Settings &gt; Media<\/code> and scroll down to <strong>Image Ninja: WebP &amp; AVIF Conversion<\/strong>.<\/li>\n<li>Choose a format under <strong>Convert uploads to<\/strong>. WebP is the safe choice for most websites.<\/li>\n<li>Click <strong>Save Changes<\/strong>. From now on, every JPEG and PNG you upload is converted.<\/li>\n<\/ol>\n\n<p>The other settings have recommended defaults, so you do not need to change them.<\/p>\n\n<!--section=faq-->\n<dl>\n<dt id=\"does%20image%20ninja%20convert%20the%20images%20already%20in%20my%20media%20library%3F\"><h3>Does Image Ninja convert the images already in my Media Library?<\/h3><\/dt>\n<dd><p>No. Only images you upload after choosing a format are converted. Images already in your Media Library are not changed.<\/p><\/dd>\n<dt id=\"will%20my%20pages%2C%20theme%20and%20page%20builder%20show%20the%20converted%20images%3F\"><h3>Will my pages, theme and page builder show the converted images?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt id=\"are%20my%20original%20jpeg%20and%20png%20files%20kept%3F\"><h3>Are my original JPEG and PNG files kept?<\/h3><\/dt>\n<dd><p>Not by default: the converted image replaces the upload, which saves disk space. To keep them, go to <code>Settings &gt; Media<\/code> and tick <strong>Also keep a copy of the original JPEG or PNG<\/strong> under <strong>Original files<\/strong>. Each original is then saved next to its converted image (for example <code>photo.jpg<\/code> next to <code>photo.webp<\/code>), 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.<\/p><\/dd>\n<dt id=\"why%20is%20one%20of%20my%20images%20still%20a%20jpeg%20or%20png%3F\"><h3>Why is one of my images still a JPEG or PNG?<\/h3><\/dt>\n<dd><p>Open the image in the Media Library to see the reason, or switch to list view and check the <strong>Image Ninja<\/strong> 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\".<\/p><\/dd>\n<dt id=\"is%20location%20%28gps%29%20data%20removed%20from%20photos%3F\"><h3>Is location (GPS) data removed from photos?<\/h3><\/dt>\n<dd><p>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 <strong>Photo location<\/strong> in <code>Settings &gt; Media<\/code>.<\/p><\/dd>\n<dt id=\"will%20the%20colours%20of%20my%20photos%20change%3F\"><h3>Will the colours of my photos change?<\/h3><\/dt>\n<dd><p>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. <code>Settings &gt; Media<\/code> shows which library your server has.<\/p><\/dd>\n<dt id=\"which%20image%20quality%20should%20i%20use%3F\"><h3>Which image quality should I use?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt id=\"which%20images%20are%20converted%3F\"><h3>Which images are converted?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt id=\"does%20it%20work%20on%20shared%20hosting%3F%20what%20does%20my%20server%20need%3F\"><h3>Does it work on shared hosting? What does my server need?<\/h3><\/dt>\n<dd><p>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 <code>Settings &gt; Media<\/code> 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.<\/p><\/dd>\n<dt id=\"does%20converting%20slow%20down%20uploads%3F\"><h3>Does converting slow down uploads?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt id=\"what%20happens%20if%20i%20deactivate%20or%20delete%20the%20plugin%3F\"><h3>What happens if I deactivate or delete the plugin?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt id=\"something%20went%20wrong.%20where%20can%20i%20find%20more%20details%3F\"><h3>Something went wrong. Where can I find more details?<\/h3><\/dt>\n<dd><p>The Media Library shows the result for every image. For technical details, enable <code>WP_DEBUG_LOG<\/code> in <code>wp-config.php<\/code>: Image Ninja then writes a line for each image to <code>wp-content\/debug.log<\/code>, including which image library was used and the file sizes. Please include these lines when asking for help in the support forum.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.1.0<\/h4>\n\n<ul>\n<li>New: Removes photo locations (GPS) from converted images and kept originals, keeping camera details, copyright and colour profiles. On by default.<\/li>\n<li>New: Only converts an image when it gets smaller; otherwise the original is kept. On by default.<\/li>\n<li>New: Option to keep a copy of the original JPEG or PNG, linked from the image details and deleted with the image.<\/li>\n<li>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.<\/li>\n<li>New: The settings page shows which formats your server supports and explains what to ask your hosting provider if something is missing.<\/li>\n<li>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.<\/li>\n<li>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.<\/li>\n<li>Improved: Faster AVIF conversion with ImageMagick.<\/li>\n<li>Improved: Settings rewritten in plain language. Formats your server cannot create are shown as unavailable instead of hidden.<\/li>\n<li>Fix: The FAQ said original files were kept, but they were replaced. Originals can now be kept with the new option.<\/li>\n<li>Fix: Photos taken with a phone held sideways are no longer shown sideways after conversion.<\/li>\n<li>Fix: Uploading an 8-bit (palette) PNG no longer causes a fatal error with WebP conversion.<\/li>\n<li>Fix: Saving the Media settings no longer switches conversion off when the saved format became unavailable on the server.<\/li>\n<li>Fix: The \"conversion not available\" warning is shown on the Media settings page only, instead of on every admin page.<\/li>\n<li>Fix: The file type is detected from the image itself instead of the name the browser reports.<\/li>\n<li>Fix: Conversion details are written to the debug log when <code>WP_DEBUG_LOG<\/code> is enabled.<\/li>\n<li>Removed manual translation loading; WordPress.org loads translations automatically.<\/li>\n<li>Requires WordPress 6.5 or later.<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>Tested with WordPress 6.8.<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release.<\/li>\n<li>Convert JPEG and PNG images to WebP and AVIF formats during upload.<\/li>\n<li>Added settings for adjusting the quality of WebP and AVIF conversions.<\/li>\n<\/ul>","raw_excerpt":"Automatically converts the JPEG and PNG images you upload to WebP or AVIF for faster pages. Keeps colours accurate and removes photo locations.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/bho.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/210808","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bho.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/bho.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/bho.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=210808"}],"author":[{"embeddable":true,"href":"https:\/\/bho.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/nitinkrsing"}],"wp:attachment":[{"href":"https:\/\/bho.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=210808"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/bho.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=210808"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/bho.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=210808"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/bho.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=210808"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/bho.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=210808"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/bho.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=210808"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}