Overview
Quick Start
Generate your first placeholder and verify blurkit output shape.
When to use
Section titled “When to use”Use this page when you need one working placeholder quickly before reading full runtime and API references.
Example
Section titled “Example”import { encode } from 'blurkit/node'
const result = await encode('./public/hero.jpg', { size: 32,})
console.log(result.dataURL)console.log(result.hash)Inputs / Options / Behavior
Section titled “Inputs / Options / Behavior”sizesets longest-side target while preserving aspect ratio.encode()returns a data URL plus metadata in one object.- Use explicit entrypoints for predictable runtime behavior:
blurkit/nodefor build and server pipelinesblurkit/denofor Deno with local file support and wasm-backed decodeblurkit/browserforFile/Blobinput in client codeblurkit/edgefor worker-style runtimes with native decode + wasm fallbackblurkit/cloudflarefor Cloudflare Workersblurkit/wasmfor runtimes without native decode APIs
- Install
blurkit-wasm-codecswhen usingblurkit/deno,blurkit/wasm, or edge fallback paths. - Install
sharpforblurkit/nodeand CLI.
Limits / Caveats
Section titled “Limits / Caveats”- Node runtime requires
sharpat execution time. - Deno runtime requires
blurkit-wasm-codecsand does not usesharp. - Browser runtime does not support local path strings such as
./public/hero.jpg. - WASM paths require
blurkit-wasm-codecsat execution time.