Image Compression Tools Compared: Squoosh, ImageMagick, Plugins and CDNs

Crawvix Editorial Team · Published November 1, 2026 · Last updated November 1, 2026 · 11 min read

The right image compression tools depend on how many images you handle, who handles them and whether the work must run automatically. A single owner with a handful of photos can use a browser tool. A developer with a build process can use a library or command-line encoder. A busy shop or publisher often needs a CMS plugin or an image CDN that processes files on upload or on request. This guide compares those categories rather than ranking brands, so you can match a tool to your situation.

Compression makes an image file smaller, either by discarding detail the eye is less likely to notice (lossy) or by storing the same pixels more efficiently (lossless). Smaller images often help pages load faster, including Largest Contentful Paint (LCP), whose "good" threshold is 2.5 seconds or less at the 75th percentile. You still need the right dimensions, format and quality settings.

Before you begin

You will need:

  • A sample of 10 to 20 real images from your site (photos, a logo, a screenshot, a hero image) and their original, highest-quality source files. Never compress an already compressed copy.
  • A note of how often you add images and who adds them, plus any privacy limits (unreleased products, client work, photos of people).

The main risk is quality loss you notice only after publishing. Test on copies and compare at display size.

What compression tools actually do

Most tools do a mix of four jobs: resize (reduce pixel dimensions, which often gives the largest saving), re-encode (save in a more efficient format or at lower quality), optimise losslessly (repack the same pixels and remove unneeded metadata such as camera details) and deliver (serve the right size and format to each visitor, with caching). A lossless optimiser will not shrink a 6000-pixel photo shown at 800 pixels, and a resizer will not fix a PNG photo. For format background, see JPEG vs PNG vs WebP vs AVIF vs SVG: Which Image Format Should You Use?.

The main categories of image compression tools

Browser tools

A browser tool lets you drop in an image, adjust settings and compare the result side by side. Squoosh, from Google Chrome Labs, is a well-known example that supports several formats.

These tools suit occasional work but are slow for many files. Check the tool's documentation to learn whether files are processed on your device or sent to a server (see the privacy section below).

Desktop apps

Desktop apps, including image editors and batch optimisers, process files on your computer. Many handle a folder at once and offer presets, which suits designers and small teams who do not want to write scripts.

Command-line tools

Command-line tools are programs you run in a terminal. They suit developers and anyone who needs repeatable results across many files. Common examples, described generally:

  • ImageMagick is a general-purpose tool that reads, converts, resizes and edits many formats. Version 7 uses the magick command, while version 6 uses convert. Its mogrify command overwrites files in place, so run it only on copies.
  • cwebp is the WebP project's encoder. It converts images to WebP with lossy or lossless settings.
  • avifenc is the AVIF encoder from the libavif project. AVIF encoding is typically slower than JPEG or WebP, so allow time for large batches.
  • mozjpeg is a JPEG encoder from Mozilla that aims for smaller JPEG files at similar visual quality.
  • oxipng is a lossless PNG optimiser that repacks PNG data without changing pixels.

Example commands:

# Resize to 1600 px wide (never enlarging) and save as a quality-80 JPEG with ImageMagick 7
magick input.jpg -resize "1600x>" -quality 80 output.jpg

# Convert a PNG to lossy WebP at quality 80
cwebp -q 80 input.png -o output.webp

Quality numbers are not the same across encoders, so quality 80 in one tool does not look like quality 80 in another.

Build-step tools

A build step runs when you build or deploy your site. In the Node ecosystem, sharp is a widely used library for resizing and converting images, including to WebP and AVIF. It lets you create several sizes and formats for each source image automatically.

const sharp = require('sharp');

async function makeVersions(input) {
  const resized = sharp(input).resize({ width: 1600, withoutEnlargement: true });
  await resized.clone().webp({ quality: 80 }).toFile('hero-1600.webp');
  await resized.clone().avif({ quality: 50 }).toFile('hero-1600.avif');
}

This route needs a developer, but once set up it is repeatable and can run in continuous integration. Many front-end frameworks include image components that wrap tools like this; check your framework's documentation.

CMS plugins

If your site runs on a content management system such as WordPress, a plugin can compress and convert images when they are uploaded and may also process existing media. This is the easiest route for non-developers. Check whether it keeps your originals, whether it processes files on your server or the plugin's servers, and how it serves modern formats. Test on a staging copy first.

Image CDNs and transformation services

An image CDN (content delivery network) stores or fetches your original images and delivers resized, re-encoded versions on request, usually controlled by URL parameters. Many can choose the format based on what the visitor's browser accepts, and they cache results close to visitors. They suit sites with many images, many page templates or user uploads. They add a third-party dependency, so read each provider's current terms and test caching headers. For general CDN guidance see CDN for SEO: Set Up a CDN Without Breaking Crawling.

Comparison table by category

Category Setup effort Control over output Automation Where files are processed
Browser tool None High per image Manual Varies by tool; check its documentation
Desktop app Install Medium to high Batch folders, sometimes presets On your computer
Command line Moderate, needs terminal skills Very high Easy to script On your computer or build server
Build-step library Higher, needs a developer Very high Runs on every build On your build server
CMS plugin Low Low to medium Runs on upload Your server or the plugin's service; check
Image CDN or service Medium Medium to high through parameters Runs on request The provider's servers

How to choose: team size, volume, automation and privacy

Your situation Categories to consider
One person, a few images a month Browser tool or desktop app
Developer with a static or front-end build Build-step library, possibly with an image CDN
Non-technical team on a CMS CMS plugin, tested on staging
Large catalogue or user uploads Image CDN or service, or a build pipeline

Four questions settle most decisions: how many images you add (manual tools stop being practical at hundreds), whether the process must run without a person, who will maintain it, and where your files may go.

When a tool "saves 80%": check what really changed

Marketing pages often quote large savings. Those numbers can be real, but they do not show whether the image is still good. Ask two things.

  • Did the dimensions change? A 4000-pixel-wide photo scaled to 1200 pixels has about one ninth of the pixels, so the file shrinks a lot before any quality change. That is a resolution change, and it is fine only if the new size covers the largest size the layout shows, including high-density screens.
  • Did the quality drop? Look at faces, skies and gradients, fine text and sharp edges at the displayed size.

A fair test compares the same image at the same displayed dimensions. Record three numbers for each image: original bytes, new bytes and displayed dimensions. If a tool saved 80 percent by cutting resolution, a plain resize would have done the same. The saving at the same dimensions with no visible damage is the number that describes the compression itself.

Privacy when you upload images to online tools

An online tool that uploads your file sends it to someone else's server. Before you use one, consider what is in the image (unreleased products, client work, documents and photos of people deserve extra care), what the privacy policy says about retention and access, and whether processing happens locally on your device. Confirm local processing from the tool's own documentation rather than assuming. Photos can also carry location and camera metadata, so strip what you do not want to publish. If any answer is unclear, use a tool that runs on your own computer or server.

A short decision flow

  1. Do the images contain anything confidential? If yes, use local tools only (desktop app, command line or build step).
  2. Do you add fewer than about a dozen images a month? If yes, a browser or desktop tool is usually enough.
  3. Do you have a developer and a build process? If yes, a build-step library, with a command-line tool for one-off jobs.
  4. Do you run a CMS without a developer? If yes, a CMS plugin, tested on staging with originals preserved.
  5. Do you have a very large library, user uploads or many device sizes? If yes, evaluate an image CDN or service.
  6. Not sure? Start with a browser tool on 10 to 20 sample images, measure, then decide whether you need automation.

Step-by-step instructions

Step 1: Measure what you have

Open a key page, open developer tools, go to the Network panel, filter by images and reload. Record the five largest image files, their format and their displayed size.

What success looks like: you know which images are heaviest and how much larger they are than the space they fill.

Step 2: Test two candidate categories on copies

Use the decision flow to choose two categories, for example a browser tool and a CMS plugin. Run 10 to 20 sample images through each at the same target dimensions, and record original bytes, new bytes and displayed dimensions.

What success looks like: each image has comparable numbers for each candidate.

Step 3: Compare quality and privacy

View results next to the originals at display size on a phone and a large screen, looking at faces, text, gradients and edges. For any online tool, service or plugin, confirm where files are processed and stored.

What success looks like: you can name the lowest quality setting that looks right for each image type and say who can access your files.

Step 4: Set up the winner and keep the originals

Configure the chosen tool with your quality and size rules. Store originals separately so you can reprocess when formats or layouts change.

What success looks like: a new image can follow the process without special knowledge.

Step 5: Serve and re-measure

Make sure pages reference the new files, include width and height and keep fallbacks for older browsers. See Responsive Images with srcset and sizes: Serve the Right Size. Then repeat Step 1 and run Lighthouse; see Improve Lighthouse Performance Without Breaking Your Website.

What success looks like: image weight is lower, nothing looks worse and the settings are written down.

Final verification checklist

  • Originals are stored safely and images are no larger in pixels than the layout needs.
  • Quality was checked at display size on phone and desktop.
  • Savings were compared at the same dimensions.
  • Modern formats have a fallback (check caniuse.com), and unwanted metadata is removed.
  • You know where each tool processes files and what happens to uploads.

Common mistakes to avoid

  • Compressing a copy of a copy. Each lossy pass adds damage. Start from the original, and resize first.
  • Trusting a headline percentage. Check dimensions and quality before believing it.
  • Overwriting the originals. Commands such as mogrify change files in place.

Frequently asked questions

What is the best tool to compress images for a website?

No single tool is best for everyone. A browser or desktop tool suits a few images, command-line and build tools suit repeatable work, and plugins and image CDNs suit larger or less technical teams. Test two or three on your own images.

Is Squoosh safe to use?

Squoosh is an open-source project from Google Chrome Labs. Whether any online tool is safe depends on what the images contain and where processing happens, so check its documentation and privacy information before using it for confidential files.

Can I compress images without losing quality?

Lossless optimisation shrinks files without changing pixels, but savings are usually modest. Lossy compression saves more at the cost of some detail, and a medium-high setting is often hard to tell from the original at display size.

Does compressing images improve SEO?

Compression is not a ranking factor on its own. Smaller images can help pages load faster, and descriptive file names and alt text help search engines understand images. There is no guarantee of any ranking change.

Should I use a plugin or an image CDN?

A plugin is simpler to set up on a CMS and keeps files on your server in many cases. An image CDN handles resizing and format choice on request and scales better for large libraries, but adds a third-party service. Compare both on a staging copy.

How do I know which images on my site need compression?

Check the Network panel in your browser for the largest image files and compare each to its displayed size. The Crawvix Image Doctor can list them for a verified website, but it does not compress or change images.

Using Crawvix to find images that need compression

Crawvix's Image Doctor lists the images written into the HTML of the pages in a full scan of a verified website (up to 2,000), then checks up to 200 of them for status, type and file size. It reports missing or generic alt text, broken images, large files, missing width and height, a lazily loaded first image, older formats and generic file names, each with evidence and what to do, plus a CSV export. It does not compress or change images. It finds which images need attention, and it only reads a website and never changes it. You then pick one of the tool categories above to fix them.

Official references


Next step: Run Image Doctor on your verified website to find which images need attention, or see how Crawvix checks a website. This guide provides technical information, not a guarantee of rankings, traffic or index inclusion.

In this category

All 32 Performance guides