The maintained Squoosh CLI alternative

@squoosh/cli is no longer maintained, so this Squoosh CLI alternative takes its place: blinkimg batch compresses images to AVIF, WebP, JPEG or PNG on your machine, reads the common squoosh-cli flags, and needs no upload and no account.

npx blinkimg ./img --to avif

What happened

Is @squoosh/cli still maintained?

No. Its npm README opens with “Project no longer maintained”, and pull request 1321 removed the CLI and libSquoosh from the Squoosh repository on 3 January 2023. The last version, 0.7.3, lists Node 12, 14 and 16 only. The squoosh.app web app is still supported.

Install

Run it with npx

One line, no global install. blinkimg needs Node 20.9 or later and has one dependency, sharp, which encodes the images. Results land in ./blinkimg-out with the same folders, and your originals stay as they are.

# Every image in img/ as AVIF
npx blinkimg ./img --to avif

# squoosh-cli style: WebP and AVIF side by side, with a suffix
npx blinkimg ./img --webp '{quality:75}' --avif auto -d dist -s .min

# Shrink a folder in place in CI, one JSON line per file
npx blinkimg ./assets --in-place --json

Flag table

squoosh-cli flags in blinkimg

Each codec flag writes one output, so --webp auto --avif auto writes both, as squoosh-cli did. Any other key inside a codec’s options stops the run with one sentence that links this table.

squoosh-cliblinkimgDifference
--mozjpeg '{quality:75}'The samequality only.
--webp '{quality:75,method:4}'--webp '{quality:75,effort:4}'method is called effort (0 to 6).
--avif '{cqLevel:33}'--avif '{quality:50}'quality (1 to 100, higher is better) replaces cqLevel; effort 0 to 9.
--oxipng '{level:2}'--oxipng '{effort:9}'Lossless PNG. effort is zlib’s level (0 to 9), not oxipng’s.
--avif auto, --webp autoThe sameauto is a fixed quality, not squoosh-cli’s Butteraugli search.
--resize '{width:1600}'The samewidth and height only. blinkimg never enlarges an image.
-d out, --output-dir outThe sameThe default is ./blinkimg-out, not the current folder.
-s .min, --suffix .minThe sameNone.
--jxl, --wp2, --quant, --rotate, --max-optimizer-rounds, --optimizer-butteraugli-targetNot supportedblinkimg stops with an error that links the flag table.

squoosh-cli flags and their blinkimg equivalents, from the blinkimg README

OptionWhat it does
--to <jpeg|png|webp|avif>Convert to this format. Default: keep each file’s format.
--quality <auto|1-100>Encoder quality. Default: auto.
--width <px>, --height <px>Fit inside this box, never enlarged.
--out <dir>, -d <dir>Write results here. Default: ./blinkimg-out, with the same folders.
--suffix <text>, -s <text>Add this to each file name: -s .min writes photo.min.avif.
--in-placeReplace each file. Only when the format is kept.
--keep-metadataKeep the metadata, EXIF included. Default: stripped, GPS included.
--jsonOne JSON line per file, for scripts.
--smartEncode through the Blinkimg API instead. Needs a key.

blinkimg’s own options

Measured

How much smaller blinkimg makes images

On the 8 test files every format could write, 4,711.6 KB of originals became 269.4 KB as AVIF (94.3% smaller), 528.5 KB as WebP (88.8% smaller) and 828.7 KB in their own formats (82.4% smaller). Measured on 30 November 2026 at the defaults.

FilePixelsOriginal KBSame format KBWebP KBAVIF KB
graphic.png640 × 4807.41.61.20.7
oriented.jpg400 × 30031.811.010.76.1
photo.avif800 × 600175.350.3106.750.3
photo.jpg800 × 600188.374.7110.853.0
photo.png800 × 6001382.4189.8109.350.9
photo.webp800 × 600234.9105.1105.150.4
screen.png3456 × 220608340.41815.4Too large for WebPToo large for AVIF
screen2.png768 × 13762683.7394.883.355.7
transparent.png512 × 5127.91.31.42.5
Total, 8 filesWithout screen.png4,711.6828.7528.5269.4

Local mode on the 9 JPEG, PNG, WebP and AVIF files of the Blinkimg engine’s test set, at the defaults, metadata stripped. Measured on 30 November 2026 with sharp 0.35.5 (libvips 8.18.7), Node 24.22.2, an Apple Silicon Mac (darwin arm64). KB is 1,000 bytes.

Sizes depend on the sharp version: a newer libvips, libwebp or libaom can change them. The package ships BENCHMARK.md, and npm run benchmark writes it again. We did not run squoosh-cli, so there is no head-to-head here.

Local or --smart

Local by default, --smart when you need it

Local mode encodes on your machine and sends nothing. The --smart option sends each file to the Blinkimg image API for what local mode does not do: a quality chosen per image, a size cap and iPhone HEIC files.

Local (default)--smart
Where it encodesYour machine, with sharpThe Blinkimg API
Account or keyNoneA free key: 500 credits a month
What leaves your machineNothingEach file, deleted within 24 hours
QualityFixed per format: JPEG 78, WebP 75, AVIF 50, PNG a 256-colour paletteChosen per image, photo or graphic
Size capNo--max-size 200kb, never over
iPhone HEIC inNoYes
Outputs per runOne per codec flagOne format
CostFree1 credit to compress, 2 to convert

Local mode and --smart, from the blinkimg README

export BLINKIMG_API_KEY=bk_...
npx blinkimg passport.jpg --smart --max-size 200kb
npx blinkimg ./iphone --smart --to jpeg

--smart output is not the same as local output: the engine picks its own settings per image. Create a free key under API keys in your dashboard.

Other local options

Other ways to compress images locally

blinkimg is one answer. Two others run on your machine too.

  • The frostoven fork

    @frostoven/squoosh-cli keeps the Squoosh CLI with the same WebAssembly codecs and flags, JPEG XL, WebP2 and the Butteraugli auto included. Pick it if you need those. Its last release, 0.9.1, came out on 30 April 2024, and an open issue reports it fails on Node 23 and 24.

  • Plain sharp

    sharp is the Node image library blinkimg is built on, Apache 2.0, Node 20.9 or later. Pick it if you want full control: you write the script that walks folders, names files and sets every encoder option yourself.

Be sure first

What blinkimg does not do

Six honest limits, so a migration has no surprises.

  • No Butteraugli search

    auto is a fixed quality per format. squoosh-cli’s auto tried several qualities against a Butteraugli target.

  • No JPEG XL or WebP2

    Output is AVIF, WebP, JPEG or PNG. --jxl, --wp2, --quant and --rotate stop the run with an error.

  • No HEIC on your machine

    sharp’s prebuilt binaries do not decode HEIC. Local mode stops with HEIC_NEEDS_SMART; --smart reads it.

  • Very tall images stay in their format

    A screenshot 22,060 pixels tall is too large for WebP and AVIF. blinkimg says so and writes nothing for that format.

  • Not the same bytes as squoosh-cli

    Different encoder builds and settings write different files. We did not run squoosh-cli, so we print no head-to-head.

  • --smart uploads your images

    Only with --smart and a key. Files go to the Blinkimg API and are deleted within 24 hours.

Switching

Move a build from squoosh-cli in three steps

Most scripts need one changed word and two renamed options.

  1. Step 1

    Swap the command

    Replace npx @squoosh/cli with npx blinkimg. It needs Node 20.9 or later.

  2. Step 2

    Rename two options

    cqLevel becomes quality (higher is better) and method becomes effort. Codec flags, -d and -s stay.

  3. Step 3

    Check the output folder

    Without -d, results go to ./blinkimg-out with the same folders. Your originals stay as they are.

Compressing in the browser instead? The Squoosh alternative compares the web apps. Want to see what your site would save first? The website image analyzer checks a page in the browser, and the image compression API comparison weighs the hosted APIs.

Sources

Where every squoosh-cli fact comes from

The packages, pull requests and issues we read, so you can check each claim yourself.

Questions, answered

Every squoosh-cli fact comes from its own package and repository; every blinkimg number from its measured benchmark.

Is @squoosh/cli still maintained?

No. The npm README of @squoosh/cli opens with “Project no longer maintained”, and pull request 1321 removed the CLI and libSquoosh from the Squoosh repository on 3 January 2023. The last version, 0.7.3, came out the same day. Squoosh named no replacement.

Does @squoosh/cli run on Node 20 or later?

Not officially. Version 0.7.3 lists Node 12, 14 and 16 in its engines field. The frostoven fork, built on the same code, failed on Node 20 with ERR_INVALID_URL until it turned off Node’s built-in fetch, and an open issue reports it fails on Node 23 and 24. blinkimg needs Node 20.9 or later.

What is the frostoven fork of squoosh-cli?

@frostoven/squoosh-cli is a community fork that keeps the Squoosh CLI, with the same WebAssembly codecs and flags, JPEG XL and WebP2 included. It is Apache 2.0. Its last npm release, 0.9.1, came out on 30 April 2024, and its last commit is from 8 December 2024.

Does blinkimg upload my images?

No, not by default. blinkimg encodes on your machine with sharp and sends nothing over the network. Only the --smart option uploads, with an API key, to the Blinkimg API, which deletes each file within 24 hours.

Which squoosh-cli flags does blinkimg read?

blinkimg reads --mozjpeg, --webp, --avif, --oxipng, --resize, -d and -s. Each codec flag writes one file, as squoosh-cli did. cqLevel becomes quality and method becomes effort; --jxl, --wp2, --quant and --rotate stop with an error.

How much smaller does blinkimg make images?

On the 8 test files every format could write, measured on 30 November 2026, 4,711.6 KB became 269.4 KB as AVIF (94.3% smaller), 528.5 KB as WebP (88.8% smaller) and 828.7 KB in their own formats (82.4% smaller).

Still have a question?

Ask us. A person reads it.

Contact us

Page updated

What people say

Every rating counts in the average, low ones too. We remove only spam, abuse and fakes.

Average rating

5.0

42 ratings, 8 written

  • 540
  • 42
  • 30
  • 20
  • 10

How did it go?

One tap. No account needed.

Filter:

Written reviews