CLI
Single Image
Generate one BlurResult JSON object from a local path or remote URL.
On this page
When to use single-image mode
Use this flow when one asset must be encoded and consumed immediately.
Write JSON to stdout
npx blurkit encode ./public/hero.jpg --prettyRemote and wasm variants
Alternative remote input example:
npx blurkit encode https://example.com/image.jpg --algorithm thumbhash --format jpeg --prettyWasm backend example:
npx blurkit encode ./public/hero.jpg --backend wasm --pretty- Without
--out, JSON is written to stdout. - With
--out, JSON is written to the given file path. - Backend defaults to
sharp; use--backend wasmfor wasm decode path. --backend wasmrequiresblurkit-wasm-codecsinstalled.
Behavior notes
- Remote URL mode can fail on network errors.
- Single-image mode does not create a manifest envelope.