Uplo
Analyzers

Image Blurhash analyzer

Stores image blurhash to blob metadata.

Usage

Install analyzer and sharp packages

npm i @uplo/analyzer-image-blurhash sharp

Add analyzer to Uplo

import { createAnalyzer } from '@uplo/analyzer'
import { imageBlurhashAnalyzer } from '@uplo/analyzer-image-blurhash'

const analyzer = createAnalyzer({
  analyzers: [imageBlurhashAnalyzer()],
})

You can configure blurhash size, xComponents and yComponents

const analyzer = createAnalyzer({
  analyzers: [
    imageBlurhashAnalyzer({
      size: 32,
      xComponents: 4,
      yComponents: 3,
    }),
  ],
})

On this page