Runtime Guides
Node Runtime
Use sharp-backed encoding for local paths, remote URLs, batching, cache, and manifests.
- entrypoint
- blurkit/node
- backend
- sharp
- install
- sharp
Why this runtime
Use blurkit/node for build steps, CMS import jobs, server-side processing, and manifest generation.
Encode from a Node pipeline
import { createFilesystemCache, encode } from 'blurkit/node'
const cache = createFilesystemCache({ dir: './.cache/blurkit', ttlMs: 300_000,})
const result = await encode('./public/hero.jpg', { size: 32, cache,})Inputs and behavior
- Supported inputs:
- local path string
- remote
http/httpsURL string URLBlobArrayBufferUint8Array(NodeBufferworks directly, including views with a non-zero byte offset)
- Requires
sharp>=0.34.5 <0.36.0at execution time. - Additional Node exports:
encodeMany()encodeManySettled()createMemoryCache()createFilesystemCache()createManifest()writeManifest()
Runtime notes
- Requires
sharp. - Missing
sharpthrowsBLURKIT_MISSING_SHARPwith install guidance. encodeMany()is fail-fast.