Skip to content

API Reference

Result

Reference for the BlurResult returned by encode() and encodeMany().

Use this page when integrating blurkit output into UI components, manifests, or database records.

const result = await encode('./public/hero.jpg')
console.log(result.dataURL)
console.log(result.hash)
console.log(result.meta.originalWidth)
interface BlurResult {
dataURL: string
hash: string
algorithm: 'blurhash' | 'thumbhash'
width: number
height: number
meta: {
originalWidth: number
originalHeight: number
format?: string
hasAlpha?: boolean
}
}
  • dataURL is the direct placeholder value for UI props.
  • hash preserves algorithm output for storage or post-processing.
  • width/height reflect placeholder dimensions.
  • meta describes source image properties when available.
  • meta is optional.
  • Stored dataURL size depends on chosen outputFormat and dimensions.