Skip to content

Use Cases

CMS Import Pipeline

Generate placeholders during Node import jobs before writing CMS records.

Use this pattern when your importer already fetches images and writes structured records.

import { encode } from 'blurkit/node'
async function processImage(url: string) {
const result = await encode(url, {
algorithm: 'blurhash',
size: 32,
})
return {
blur_data_url: result.dataURL,
blur_hash: result.hash,
blur_algorithm: result.algorithm,
image_width: result.meta.originalWidth,
image_height: result.meta.originalHeight,
}
}
  • Remote input is fetched in Node runtime.
  • Placeholder and source metadata are emitted in one result.
  • The same pattern works for DB, CMS, or search index writes.
  • Import job must handle network and decode failures.
  • Batch jobs should decide between fail-fast and per-item error handling.