Powered by libvips · macOS CLI

Compress smarter.
Ship faster.

Shrinkr batch-compresses your images to a target file size using a binary search algorithm — WebP, AVIF, JPEG, PNG. One command. No config required.

$

Features

Everything you need.
Nothing you don't.

A focused, zero-config CLI that does one thing extremely well.

Blazing fast

Powered by libvips — one of the fastest image processing libraries on the planet.

Hit your target

Binary search compression finds the highest quality that still fits under your KB limit.

Format conversion

Convert any input to WebP, AVIF, JPEG, or PNG in a single pass.

Interactive wizard

Run shrinkr with no args to launch a guided step-by-step terminal wizard.

Batch processing

Process entire folders — or scan subdirectories recursively — with one command.

Full control

Fine-tune quality floors, ceilings, target sizes, and worker count via flags.

How it works

Four steps. One command.

01

Scan

Shrinkr finds every supported image in your folder — JPG, PNG, TIFF, WebP, GIF, AVIF, HEIF/HEIC.

02

Target

You choose the output format and maximum file size in KB. The defaults (WebP, 500 KB) work great for most cases.

03

Compress

A binary search algorithm finds the highest quality that still meets the target size — up to 10 iterations per image.

04

Output

Compressed images land in a separate output folder, preserving directory structure. All images are processed concurrently.

Quick start

Up and running in 30 seconds.

Install via Homebrew — libvips is handled automatically. Then point Shrinkr at any folder and get back optimized images. No configuration file required.

Full installation guide
terminal
# Install (Homebrew handles libvips automatically)
$brew install idrewlong/tap/shrinkr
 
# Compress a folder to WebP at 500 KB target (default)
$shrinkr ./photos
 
# Custom: AVIF, 300 KB target, custom output folder
$shrinkr ./photos -f avif -s 300 -o ./compressed

Presets

Smart defaults for every use case.

The interactive wizard ships with four presets. Pick one, or dial in your own settings.

default

Recommended

Target
500 KB
Quality
85
Range
60–90

General use — balanced quality & size

Web Optimized

Target
200 KB
Quality
75
Range
50–80

Web assets, thumbnails, fast loading

High Quality

Target
2 MB
Quality
95
Range
85–98

Portfolios, print prep, archival

Custom

Target
You choose
Quality
You choose
Range
You choose

Full control over all settings

Formats

Read many. Write four.

Shrinkr ingests everything your camera or workflow produces, and outputs to the formats the web actually needs.

Input Formats

JPG / JPEG.jpg, .jpeg
PNG.png
TIFF / TIF.tiff, .tif
WebP.webp
GIF.gif
AVIF.avif
HEIF / HEIC.heif, .heic

Output Formats

WebP-f webp
Recommended — best quality/size
AVIF-f avif
Smallest files, slower encode
JPEG-f jpeg
Universal compatibility
PNG-f png
Lossless output

GIF, AVIF, and HEIF/HEIC can be read and recompressed, but cannot be used as output formats.

Smaller files. Faster workflow.

One Homebrew command. Zero configuration. Instant results.