Adds a blurhash plugin that generates a small base64 WebP data URL for every new image upload and stores it on the upload document. It adds fields to targeted upload collections, with configurable resolution and an admin preview with a regenerate button. Requires Payload 3 and sharp as a peer dependency.
Payload CMS plugin for automatic blurhash generation on image uploads.
Installation
npm i @nlvogel/payload-blurhash3
Stars
0
Forks
0
Open Issues
1 months ago
Last Updated
11
Weekly Downloads
v0.1.0
npm Version
44.0 KB
Unpacked Size
0
Dependencies
3+2 since Sep 6
| Date | Stars |
|---|---|
| Dec 5, 2026 | 3 |
| Dec 4, 2026 | 3 |
| Dec 3, 2026 | 3 |
| Dec 2, 2026 | 2 |
| Dec 1, 2026 | 2 |
| Nov 30, 2026 | 2 |
| Nov 29, 2026 | 2 |
| Nov 28, 2026 | 2 |
| Nov 27, 2026 | 2 |
| Nov 26, 2026 | 2 |
| Nov 25, 2026 | 2 |
| Nov 24, 2026 | 2 |
| Nov 23, 2026 | 2 |
| Nov 22, 2026 | 2 |
| Nov 21, 2026 | 2 |
| Nov 20, 2026 | 2 |
| Nov 19, 2026 | 2 |
| Nov 18, 2026 | 2 |
| Nov 17, 2026 | 2 |
| Nov 16, 2026 | 2 |
| Nov 15, 2026 | 2 |
| Nov 14, 2026 | 2 |
| Nov 13, 2026 | 2 |
| Nov 12, 2026 | 2 |
| Nov 11, 2026 | 2 |
| Nov 10, 2026 | 2 |
| Nov 9, 2026 | 2 |
| Nov 8, 2026 | 2 |
| Nov 7, 2026 | 2 |
| Nov 6, 2026 | 2 |
| Nov 5, 2026 | 2 |
| Nov 4, 2026 | 2 |
| Nov 3, 2026 | 1 |
| Nov 2, 2026 | 1 |
| Nov 1, 2026 | 1 |
| Oct 31, 2026 | 1 |
| Oct 30, 2026 | 1 |
| Oct 29, 2026 | 1 |
| Oct 28, 2026 | 1 |
| Oct 27, 2026 | 1 |
| Oct 26, 2026 | 1 |
| Oct 25, 2026 | 1 |
| Oct 24, 2026 | 1 |
| Oct 23, 2026 | 1 |
| Oct 22, 2026 | 1 |
| Oct 21, 2026 | 1 |
| Oct 20, 2026 | 1 |
| Oct 19, 2026 | 1 |
| Oct 18, 2026 | 1 |
| Oct 17, 2026 | 1 |
| Oct 16, 2026 | 1 |
| Oct 15, 2026 | 1 |
| Oct 14, 2026 | 1 |
| Oct 13, 2026 | 1 |
| Oct 12, 2026 | 1 |
| Oct 11, 2026 | 1 |
| Oct 10, 2026 | 1 |
| Oct 9, 2026 | 1 |
| Oct 8, 2026 | 1 |
| Oct 7, 2026 | 1 |
| Oct 6, 2026 | 1 |
| Oct 5, 2026 | 1 |
| Oct 4, 2026 | 1 |
| Oct 3, 2026 | 1 |
| Oct 2, 2026 | 1 |
| Oct 1, 2026 | 1 |
| Sep 30, 2026 | 1 |
| Sep 29, 2026 | 1 |
| Sep 28, 2026 | 1 |
| Sep 27, 2026 | 1 |
| Sep 26, 2026 | 1 |
| Sep 25, 2026 | 1 |
| Sep 24, 2026 | 1 |
| Sep 23, 2026 | 1 |
| Sep 22, 2026 | 1 |
| Sep 21, 2026 | 1 |
| Sep 20, 2026 | 1 |
| Sep 19, 2026 | 1 |
| Sep 18, 2026 | 1 |
| Sep 17, 2026 | 1 |
| Sep 16, 2026 | 1 |
| Sep 15, 2026 | 1 |
| Sep 14, 2026 | 1 |
| Sep 13, 2026 | 1 |
| Sep 12, 2026 | 1 |
| Sep 11, 2026 | 1 |
| Sep 10, 2026 | 1 |
| Sep 9, 2026 | 1 |
| Sep 8, 2026 | 1 |
| Sep 7, 2026 | 1 |
| Sep 6, 2026 | 1 |
12+5 since Sep 6
| Date | Weekly downloads |
|---|---|
| Dec 5, 2026 | 12 |
| Dec 4, 2026 | 14 |
| Dec 3, 2026 | 14 |
| Dec 2, 2026 | 14 |
| Dec 1, 2026 | 22 |
| Nov 30, 2026 | 38 |
| Nov 29, 2026 | 35 |
| Nov 28, 2026 | 52 |
| Nov 27, 2026 | 50 |
| Nov 26, 2026 | 51 |
| Nov 25, 2026 | 50 |
| Nov 24, 2026 | 40 |
| Nov 23, 2026 | 24 |
| Nov 22, 2026 | 25 |
| Nov 21, 2026 | 5 |
| Nov 20, 2026 | 4 |
| Nov 19, 2026 | 5 |
| Nov 18, 2026 | 6 |
| Nov 17, 2026 | 6 |
| Nov 16, 2026 | 6 |
| Nov 15, 2026 | 8 |
| Nov 14, 2026 | 8 |
| Nov 13, 2026 | 8 |
| Nov 12, 2026 | 5 |
| Nov 11, 2026 | 4 |
| Nov 10, 2026 | 3 |
| Nov 9, 2026 | 4 |
| Nov 8, 2026 | 3 |
| Nov 7, 2026 | 3 |
| Nov 6, 2026 | 4 |
| Nov 5, 2026 | 6 |
| Nov 4, 2026 | 6 |
| Nov 3, 2026 | 19 |
| Nov 2, 2026 | 19 |
| Nov 1, 2026 | 18 |
| Oct 31, 2026 | 19 |
| Oct 30, 2026 | 18 |
| Oct 29, 2026 | 16 |
| Oct 28, 2026 | 16 |
| Oct 27, 2026 | 4 |
| Oct 26, 2026 | 4 |
| Oct 25, 2026 | 6 |
| Oct 24, 2026 | 5 |
| Oct 23, 2026 | 5 |
| Oct 22, 2026 | 7 |
| Oct 21, 2026 | 7 |
| Oct 20, 2026 | 6 |
| Oct 19, 2026 | 5 |
| Oct 18, 2026 | 6 |
| Oct 17, 2026 | 6 |
| Oct 16, 2026 | 6 |
| Oct 15, 2026 | 4 |
| Oct 14, 2026 | 4 |
| Oct 13, 2026 | 4 |
| Oct 12, 2026 | 4 |
| Oct 11, 2026 | 4 |
| Oct 10, 2026 | 4 |
| Oct 9, 2026 | 4 |
| Oct 8, 2026 | 4 |
| Oct 7, 2026 | 4 |
| Oct 6, 2026 | 5 |
| Oct 5, 2026 | 5 |
| Oct 4, 2026 | 1 |
| Oct 3, 2026 | 2 |
| Oct 2, 2026 | 2 |
| Oct 1, 2026 | 2 |
| Sep 30, 2026 | 2 |
| Sep 29, 2026 | 1 |
| Sep 28, 2026 | 1 |
| Sep 27, 2026 | 2 |
| Sep 26, 2026 | 4 |
| Sep 25, 2026 | 7 |
| Sep 24, 2026 | 7 |
| Sep 23, 2026 | 7 |
| Sep 22, 2026 | 8 |
| Sep 21, 2026 | 9 |
| Sep 20, 2026 | 8 |
| Sep 19, 2026 | 5 |
| Sep 18, 2026 | 2 |
| Sep 17, 2026 | 2 |
| Sep 16, 2026 | 4 |
| Sep 15, 2026 | 4 |
| Sep 14, 2026 | 3 |
| Sep 13, 2026 | 3 |
| Sep 12, 2026 | 4 |
| Sep 11, 2026 | 4 |
| Sep 10, 2026 | 5 |
| Sep 9, 2026 | 4 |
| Sep 8, 2026 | 6 |
| Sep 7, 2026 | 6 |
| Sep 6, 2026 | 7 |
Each point is npm's rolling 7-day download count.
Health Score
Composite score based on GitHub activity, stars, npm downloads, publish recency, dependency count, and package size.
Badge for your README
[](https://payloaddirectory.dev/plugins/1224146426-root)<a href="https://payloaddirectory.dev/plugins/1224146426-root"><img src="https://payloaddirectory.dev/badge/1224146426-root.svg" alt="Payload Directory"></a>README
A Payload CMS plugin that automatically generates a tiny base64 WebP placeholder ("blurhash") for image uploads. Use it to render an instant blurred preview while the full image loads — the same trick Next.js, Medium, and Unsplash use.
The placeholder is stored as a data:image/webp;base64,... string directly on the upload document, so your frontend can render it without an extra request.
pnpm add @nlvogel/payload-blurhash
# or
npm install @nlvogel/payload-blurhash
sharp is a peer dependency. If you're already running Payload, you have it.
// payload.config.ts
import { buildConfig } from 'payload'
import { blurhashPlugin } from '@nlvogel/payload-blurhash'
export default buildConfig({
plugins: [
blurhashPlugin({
// Optional — limit to specific upload collections.
// Omit to apply to all upload-enabled collections.
collections: ['media'],
}),
],
})
The plugin adds the following fields to each targeted upload collection:
| Field | Type | Description |
|---|---|---|
blurhash | text (read-only) | The base64-encoded WebP data URL. |
blurhashComponentX | number (1–9) | Horizontal resolution of the placeholder. |
blurhashComponentY | number (1–9) | Vertical resolution of the placeholder. |
blurhashPreview | ui | Sidebar preview with a "Regenerate" button. |
A blurhash is generated on every new image upload, and re-generated whenever blurhashComponentX or blurhashComponentY change.
blurhashPlugin({
collections?: string[] // upload collection slugs; omit = all
componentX?: number // default X resolution, 1–9 (default: 4)
componentY?: number // default Y resolution, 1–9 (default: 3)
enabled?: boolean // disable without uninstalling (default: true)
})
The value is already a base64 WebP data URL, so it drops straight into next/image as blurDataURL:
import Image from 'next/image'
<Image
src={media.url}
width={media.width}
height={media.height}
alt={media.alt ?? ''}
placeholder="blur"
blurDataURL={media.blurhash}
/>
Or use it as a plain <img> for a static blur:
<img
src={media.blurhash}
style={{ aspectRatio: `${media.width} / ${media.height}` }}
/>
The plugin registers POST /api/blurhash/regenerate for the in-admin "Regenerate" button. It requires an authenticated request and accepts:
{
"id": "<doc id>",
"collection": "<slug>",
"componentX": 4,
"componentY": 3
}
It returns { "blurhash": "data:image/webp;base64,..." } without persisting — saving the document writes the new value.
^3.0.0^18.20.2 || >=20.9.0^18 || ^19MIT © Nick Vogel
payloadcms plugin image optimizer
Client-side resize, ThumbHash blur placeholders, filename strategies and bulk regeneration on top of Payload's sharp…
79666/wk27v3
payload plugin aspect preview
Live multi-aspect-ratio previews with crop and focal point editing for Payload upload collections
78174/wk6v3
blur data urls
Generate blur placeholder data URLs automatically for images uploaded to Payload media collections
66139/wk84v3
image framing
Non-destructive crop and focus areas for Payload uploads, with per-usage overrides and responsive framing
6080/wk2v3
images
On-demand Sharp image transforms with focal-point cropping, built-in LQIP placeholders and a favicons collection
6032/wk37v3
payload images
On-demand Sharp image transforms with focal-point cropping, placeholders and a responsive image component
5449/wk18v3