Point at the folder.
Quoted globs, recursive trees, include/exclude filters, symlinks, and collision detection. One command handles the whole asset directory.
Point pixelpress at a folder or a glob. Get AVIF, WebP, JPEG, and PNG at the
widths you actually ship — with a cache that cleans up, animated WebP,
manifests, <picture> snippets, and an API
that behaves like the CLI.
Convert any image. Install nothing. npx fetches pixelpress, runs it, and gets out of the way. Add it to package.json only when you want it in the build.
$ npx pixelpress "public/**/*.{jpg,png}" -o dist -w 480,960 pixelpress 42 files → /app/dist (avif,webp) ✓ hero.jpg 1.4 MB → 182.3 KB 87% smaller ✓ team/ana.png 420.1 KB → 61.8 KB 85% smaller ✓ chair.webp 118.4 KB → 44.2 KB 63% smaller 42 files · 84 outputs · 18.2 MB → 3.1 MB (83% smaller) · 4.2s
Most image tools make you choose between one file at a time and a wall of configuration. pixelpress is built for the whole folder: sensible defaults, explicit options, and output that is ready to ship.
Quoted globs, recursive trees, include/exclude filters, symlinks, and collision detection. One command handles the whole asset directory.
Responsive width sets, never upscaled. Hash filenames, prefixes, suffixes, and a manifest with ready-to-use srcset strings.
Animated GIF and WebP inputs keep their frames in WebP output, including resized widths. Static formats fall back to the first frame.
Set a per-variant byte budget and pixelpress searches quality down until it fits. If it cannot, the file fails loudly instead of shipping oversized.
Cached by input mtime + option fingerprint. --prune deletes outputs no longer produced and removes empty directories, without touching inputs.
Every image, manifest, report, and cache file is written to a temp file and renamed. A failed multi-format run rolls back newly created outputs.
Gather, transform, encode, and hand off. Nothing hides behind a build plugin you have to install first.
Files, folders, globs, filters, symlinks. Mirror the tree or flatten it.
Resize, crop, rotate, trim, extend, blur, sharpen, tint, grayscale.
AVIF, WebP, JPEG, PNG. Per-format quality, effort, lossless, budgets.
Manifest + srcset, <picture>, LQIP, HTML report, or stdout.
The cache lives outside your deployable output. The fingerprint covers quality, widths, transforms, and output paths, so changing an option invalidates exactly what it should.
--prune cleans up deleted sources and retired formats.
Failed files keep their old outputs. --watch re-runs with the
same cache and prune settings.
# First run pixelpress photos -o dist -r # Second run: unchanged files are reused pixelpress photos -o dist -r # Clean retired sizes and formats pixelpress photos -o dist -r --prune # Keep going while you work pixelpress photos -o dist -r --watch
import { optimize } from 'pixelpress'; const report = await optimize( ['public/images/**/*.{jpg,png}'], { outDir: 'dist/images', preset: 'web', widths: [480, 960, 1920], cache: true, prune: true, }, ); console.log(report.totals.savedPercent);
The CLI is a thin surface over the same engine. If it works in your terminal, it works from Node — including transforms, budgets, cache, and failure reporting.
One image through a pipe? --stdout. A whole asset tree? A
glob. Need the result in your build? The manifest has paths, bytes,
dimensions, quality, and srcset.
No glue code between the encoder and the page. Generate the artifacts your templates already want.
Dimensions, bytes, quality, frames, cache state, and per-format srcset strings in one JSON file.
Animated WebP first, AVIF/WebP sources, static fallback, width and height attributes, lazy loading.
A self-contained before/after gallery with byte deltas, dimensions, quality, and cache state.
Install pixelpress, point it at your images, and get a shipping-ready output tree in one command.
Three separate projects from the same small-tool habit. MIT licensed, no lock-in, no dashboards.
A 4 KB HTML fragment loader for server-rendered apps. Forms, polling, out-of-band swaps, and SSE without a SPA or build step.
Visit Minu EditorGive every VS Code project its own window colour and every JetBrains project a matching toolbar, straight from the terminal.
Visit hue-shift AccessibilityA self-hosted accessibility toolbar with 30 tools and 7 profiles, with adapters for every frontend stack.
Visit open-a11y