A WordPress image plugin compresses the original and every thumbnail, makes WebP or AVIF copies and serves them to supporting browsers. The real differences are where the work happens (your server, the vendor's servers or your browser), how credits are counted, and whether originals can be restored. Test on a few images in a copy of your site before processing the whole library.
How WordPress image plugins work
Almost every image optimization plugin follows the same routine. It hooks into the upload, compresses the original and every thumbnail size WordPress generated, creates a WebP or AVIF copy, and then makes sure visitors receive that copy. A bulk tool does the same for pictures that were already in the Media Library, in small batches so the site does not stall.
Delivery works in one of two ways. Some plugins rewrite your page so each img becomes a picture element with the modern format first and the original as a fallback. Others add server rules that return the WebP file to browsers that ask for it. Either way, a browser that does not understand the new format simply keeps using the original.
The three places compression can happen
The biggest difference between plugins is where the work is done. That choice decides the cost, the speed and the privacy.
| Where it runs | Good | Watch out for |
|---|---|---|
| On your web server (PHP GD or Imagick) | Free, unlimited and private | Your host must support WebP or AVIF in those libraries, and quality is only as good as the library |
| On the plugin company's servers (cloud API) | Strong results and little load on your site | Usually credit based, and your pictures leave your site |
| In your browser (WebAssembly) | No credits, no server libraries, nothing sent to a third party | The admin tab has to stay open during a bulk run, and uploads that never pass through a browser are handled later |
What to check before you install one
- How credits are counted. WordPress makes several sizes of every upload. Some plugins charge for each size, so one photo can use many credits. The TinyPNG plugin, for example, counts every image size separately and uses an extra credit to convert to WebP or AVIF. Read the plugin's own pricing page before a bulk run.
- What happens at the limit. Find out whether the plugin just stops, or whether images are served from the vendor's network and can disappear when a quota is exceeded.
- Backups and restore. Compression is lossy. You want the original saved and a one-click way to bring it back.
- How the new format is delivered. A
pictureelement can change how a theme styles images. A plugin should let you switch that off. - Animated images. Re-encoding a GIF or an animated WebP can flatten it to a single frame. A good plugin leaves them alone.
- Privacy. Cloud plugins send your images to another company. If your site shows private or client material, check the privacy policy first.
Do you need both WebP and AVIF?
WebP is supported by current browsers and is usually noticeably smaller than JPEG. AVIF is often smaller still but slower to create, so large libraries take longer. WordPress itself added AVIF support in version 6.5, but it depends on the image library installed on the server, which is one more reason a browser-based tool can be easier on shared hosting.
A sensible default is WebP for everything, and AVIF as an extra for large photos where the saving matters. Always compare the results: a modern-format copy that is not smaller than the optimized original is not worth serving.
A free, browser-based option
We built a plugin that runs our own compression engine in the WordPress admin. It compresses JPEG, PNG and WebP, creates WebP and optional AVIF copies, keeps a backup of every original, and has no credits or limits because it never sends images anywhere except back to your own site. It is an early beta, and it has the trade-offs of any browser-based tool described above. You can read the details and download it on the WordPress plugin page.
Whatever tool you pick, test it on a few images in a copy of your site first, and keep a full backup before you process the whole library.
How to bulk compress your Media Library safely
- Back up your site and its uploads folder.
- Try five images first. Open them on the front end and check sharpness, transparency and layout.
- Choose sensible quality. Around 80 for JPEG and WebP is a good starting point.
- Run the bulk job at a quiet time and keep the tab open if the tool works in your browser.
- Clear caches. Purge your page cache and CDN so visitors receive the new files.
- Measure. Compare page weight before and after with a speed testing tool.
Quick answers
Which is the best free image compression plugin for WordPress?
It depends on your host and your priorities. Plugins that run on your own server cost nothing per image but need WebP support from the host, cloud plugins give strong results but usually limit free use with credits, and browser-based plugins avoid both problems but need an open admin tab. Test two or three on a copy of your site.
Will compressing images hurt my SEO?
Done sensibly it helps, because smaller images load faster. Over-compression can make pictures look soft, so check a few results first and keep the originals so you can undo it.
Can I convert my WordPress images to WebP without a plugin?
You can convert files by hand and re-upload them, but that is slow for a whole library. A plugin automates the conversion and delivers the right format to each browser.
Do I need AVIF as well as WebP?
No. WebP alone covers most of the benefit. AVIF can save more on large photos but takes longer to create, so treat it as an optional extra.
Is it safe to compress the whole Media Library at once?
It is safe when you have a backup and have tested a few images first. Use a tool that keeps the originals and offers a restore button.
Sources and further reading
- WordPress 6.5 adds AVIF support (make.wordpress.org)
- The picture element (MDN)
- TinyPNG WordPress plugin pricing (Tinify help)
- WebP (Wikipedia)
- AVIF (Wikipedia)
Try it on your own image
Compress in your browser. Nothing is uploaded, and there is nothing to install.
Open the image compressor