Runtime entrypoints
Import the runtime you actually run on. No conditional shims, no guessing which decode path fired.
v0.1.12universal placeholder generationMIT
blurkit turns any image into a BlurHash or ThumbHash data URL across Node, Deno, browser, edge, Cloudflare, and WASM. One encode call, six runtimes, no ceremony.
pnpm add blurkit sharpDecode, downscale, hash and render sit behind one call. The rest is tooling for builds, batches, and caches that survive a cold start.
Import the runtime you actually run on. No conditional shims, no guessing which decode path fired.
BlurHash for a tunable gradient, ThumbHash when the payload has to stay tiny. Same call, one flag.
Every encode returns a data URL, the raw hash, placeholder dimensions, and the source metadata behind it.
encodeMany() for one job with many images, encodeManySettled() when a single bad file must not sink the run.
Single-image JSON from the terminal, or folder manifests wired straight into a build and a CMS import.
Memory and filesystem helpers for Node, worker cache support on Cloudflare. Encode once, reuse everywhere.
Each entrypoint picks its own decode path. Use the native one when the runtime has it, the wasm codecs when it does not.
blurkit/nodesharpsharpDenoblurkit/denowasmwasm-codecsBrowserblurkit/browsercanvasnoneEdgeblurkit/edgenative + wasmwasm-codecsCloudflareblurkit/cloudflarecf.imagenoneWASMblurkit/wasmwasmwasm-codecsEvery entrypoint ships encode(), encodeMany(), and encodeManySettled().Compare runtimes in the docs
The demo runs the browser runtime on your machine. Drop an image, move the sliders, read the exact payload you would ship.
// Waiting for a generated data URL.