Skip to content
Dus Mamud edited this page Nov 9, 2026 · 1 revision

@dusrel/image — client-side image processing

@dusrel/image — Wiki

Client-side image processing, done properly. Compress, crop, resize, rotate and convert images entirely in the browser — no backend, no uploads, no server cost — with real WASM codecs and maximum developer control.

Current release 1.0.1 — all 24 packages on npm, versioned in lockstep
Licence MIT (the HEIC decoder's engine is LGPL-3.0, fenced to its own package)
Documentation dusmamud.github.io/dusrel-image
Playground Try every codec live — no install, no uploads
npm @dusrel/image

Start here

Page What it covers
Getting Started Install, first conversion, byte budgets, the pipeline, the crop component
Core Concepts The two layers, step order, plugins, fallback policies, the process report, typed errors
Cookbook Twelve recipes for the jobs people actually do
Package Guide All 24 packages — which one does what
Codec Guide Every codec: engine, WASM size, when to pick it
Browser Support The support matrix, Safari notes, and why you don't need COOP/COEP
FAQ Cost, formats, Vite dev, byte budgets, and other common questions

Why client-side?

  • Private by architecture — images never leave the visitor's device. Nothing to subpoena, nothing to leak; compliance gets simpler.
  • Zero running cost — the visitor's CPU does the work. There is no image server to host, scale, patch or pay for.
  • Embeds anywhere — the codecs are single-threaded by design, so the library works in any page, iframe or embed without Cross-Origin-Opener-Policy / Cross-Origin-Embedder-Policy headers.

The family at a glance

Group Count Contents
Core 2 @dusrel/image (flagship) + @dusrel/image-core (zero-dependency Canvas engine)
Codecs 10 JPEG · WebP · AVIF · PNG · OxiPNG · resize · quantize · QOI · JPEG XL · HEIC
Features 9 crop · transform · adjust · metadata · watermark · batch · GIF · SVG · placeholder
Frameworks 3 React · Vue · Svelte bindings

Every package is separately installable, ESM-only, and its WASM loads lazily — no codec is ever bundled into the core. Defaults are easy; every step, codec and fallback is overridable.

Going deeper

Proof, not promises

  • Every package's browser spec runs on CI in Chromium, Firefox and WebKit (Playwright).
  • A separate consumer test installs the published packages into a fresh React + Vite app and runs 25 in-browser checks against them — live here.

Clone this wiki locally