Utility to convert blurhash to base64
npm install blurhash-base64:unicorn: Turn blurhash to dataURL on the go.
!Test
!Downloads this Week
!Bundle Size
!Version
- Node.js 16X LTS or Higher 📦
- Install the NPM Package with the below command:
``bash
#npm
npm install blurhash-base64
#yarn
yarn add blurhash-base64
#pnpm
pnpm add blurhash-base64
`
- Import blurhashToBase64 in your projectplaceholder
- Set the prop to blurblurDataURL
- And pass the blurhash to prop surrounded by blurhashToBase64 (See below example)
`javascript
import Image from "next/image";
import { blurhashToBase64 } from "blurhash-base64"; // Import blurhashToBase64
export default function Home() {
return (
- Blurhash is Generated with blurhash-from-url - A library to generate the blurhash from the given URL.
- Blurhash CLI - Generate Blurhash in CLI
#### :green_heart: Message
I hope you find this useful. If you have any questions, please create an issue.