Adds an Images upload collection that stores only the original file and generates, crops and caches each rendered size on first request using Sharp. Includes an admin focal-point picker, upload-time placeholder and palette metadata, and a ResponsiveImage React component. Requires Payload 3, React 19, sharp and Next.js 15 or later with the App Router.
Image optimization for Payload CMS: an Images upload collection that stores only the original, an on-demand Sharp transform endpoint (focal-aware crop, format negotiation, built-in LQIP placeholders), a durable variant cache with two-way purge, an admin focal-point picker, and a responsive <ResponsiveImage> component.
Installation
npm i @pro-laico/payload-images18
Stars
1
Forks
1
Open Issues
3 months ago
Last Updated
49
Weekly Downloads
v0.8.5
npm Version
1.0 MB
Unpacked Size
0
Dependencies
18+2 since Sep 7
| Date | Stars |
|---|---|
| Dec 6, 2026 | 18 |
| Dec 5, 2026 | 18 |
| Dec 4, 2026 | 18 |
| Dec 3, 2026 | 18 |
| Dec 2, 2026 | 18 |
| Dec 1, 2026 | 18 |
| Nov 30, 2026 | 18 |
| Nov 29, 2026 | 18 |
| Nov 28, 2026 | 18 |
| Nov 27, 2026 | 19 |
| Nov 26, 2026 | 19 |
| Nov 25, 2026 | 19 |
| Nov 24, 2026 | 19 |
| Nov 23, 2026 | 19 |
| Nov 22, 2026 | 19 |
| Nov 21, 2026 | 19 |
| Nov 20, 2026 | 19 |
| Nov 19, 2026 | 19 |
| Nov 18, 2026 | 19 |
| Nov 17, 2026 | 18 |
| Nov 16, 2026 | 18 |
| Nov 15, 2026 | 18 |
| Nov 14, 2026 | 18 |
| Nov 13, 2026 | 18 |
| Nov 12, 2026 | 18 |
| Nov 11, 2026 | 18 |
| Nov 10, 2026 | 18 |
| Nov 9, 2026 | 18 |
| Nov 8, 2026 | 18 |
| Nov 7, 2026 | 18 |
| Nov 6, 2026 | 18 |
| Nov 5, 2026 | 18 |
| Nov 4, 2026 | 18 |
| Nov 3, 2026 | 18 |
| Nov 2, 2026 | 18 |
| Nov 1, 2026 | 18 |
| Oct 31, 2026 | 18 |
| Oct 30, 2026 | 18 |
| Oct 29, 2026 | 18 |
| Oct 28, 2026 | 18 |
| Oct 27, 2026 | 18 |
| Oct 26, 2026 | 18 |
| Oct 25, 2026 | 18 |
| Oct 24, 2026 | 18 |
| Oct 23, 2026 | 18 |
| Oct 22, 2026 | 18 |
| Oct 21, 2026 | 17 |
| Oct 20, 2026 | 17 |
| Oct 19, 2026 | 17 |
| Oct 18, 2026 | 17 |
| Oct 17, 2026 | 17 |
| Oct 16, 2026 | 17 |
| Oct 15, 2026 | 17 |
| Oct 14, 2026 | 17 |
| Oct 13, 2026 | 17 |
| Oct 12, 2026 | 17 |
| Oct 11, 2026 | 17 |
| Oct 10, 2026 | 17 |
| Oct 9, 2026 | 17 |
| Oct 8, 2026 | 17 |
| Oct 7, 2026 | 17 |
| Oct 6, 2026 | 17 |
| Oct 5, 2026 | 17 |
| Oct 4, 2026 | 17 |
| Oct 3, 2026 | 17 |
| Oct 2, 2026 | 16 |
| Oct 1, 2026 | 16 |
| Sep 30, 2026 | 16 |
| Sep 29, 2026 | 16 |
| Sep 28, 2026 | 16 |
| Sep 27, 2026 | 16 |
| Sep 26, 2026 | 16 |
| Sep 25, 2026 | 16 |
| Sep 24, 2026 | 16 |
| Sep 23, 2026 | 16 |
| Sep 22, 2026 | 16 |
| Sep 21, 2026 | 16 |
| Sep 20, 2026 | 16 |
| Sep 19, 2026 | 16 |
| Sep 18, 2026 | 16 |
| Sep 17, 2026 | 16 |
| Sep 16, 2026 | 16 |
| Sep 15, 2026 | 16 |
| Sep 14, 2026 | 16 |
| Sep 13, 2026 | 16 |
| Sep 12, 2026 | 16 |
| Sep 11, 2026 | 16 |
| Sep 10, 2026 | 16 |
| Sep 9, 2026 | 16 |
| Sep 8, 2026 | 16 |
| Sep 7, 2026 | 16 |
Shared by 7 plugins in pro-laico/payload-plugins.
49+18 since Sep 7
| Date | Weekly downloads |
|---|---|
| Dec 6, 2026 | 49 |
| Dec 5, 2026 | 20 |
| Dec 4, 2026 | 21 |
| Dec 3, 2026 | 22 |
| Dec 2, 2026 | 5 |
| Dec 1, 2026 | 25 |
| Nov 30, 2026 | 24 |
| Nov 29, 2026 | 23 |
| Nov 28, 2026 | 23 |
| Nov 27, 2026 | 22 |
| Nov 26, 2026 | 23 |
| Nov 25, 2026 | 24 |
| Nov 24, 2026 | 4 |
| Nov 23, 2026 | 4 |
| Nov 22, 2026 | 7 |
| Nov 21, 2026 | 6 |
| Nov 20, 2026 | 7 |
| Nov 19, 2026 | 8 |
| Nov 18, 2026 | 21 |
| Nov 17, 2026 | 21 |
| Nov 16, 2026 | 22 |
| Nov 15, 2026 | 21 |
| Nov 14, 2026 | 22 |
| Nov 13, 2026 | 21 |
| Nov 12, 2026 | 18 |
| Nov 11, 2026 | 4 |
| Nov 10, 2026 | 21 |
| Nov 9, 2026 | 20 |
| Nov 8, 2026 | 32 |
| Nov 7, 2026 | 31 |
| Nov 6, 2026 | 32 |
| Nov 5, 2026 | 32 |
| Nov 4, 2026 | 37 |
| Nov 3, 2026 | 20 |
| Nov 2, 2026 | 24 |
| Nov 1, 2026 | 19 |
| Oct 31, 2026 | 19 |
| Oct 30, 2026 | 18 |
| Oct 29, 2026 | 18 |
| Oct 28, 2026 | 13 |
| Oct 27, 2026 | 15 |
| Oct 26, 2026 | 11 |
| Oct 25, 2026 | 3 |
| Oct 24, 2026 | 3 |
| Oct 23, 2026 | 3 |
| Oct 22, 2026 | 6 |
| Oct 21, 2026 | 9 |
| Oct 20, 2026 | 8 |
| Oct 19, 2026 | 10 |
| Oct 18, 2026 | 9 |
| Oct 17, 2026 | 9 |
| Oct 16, 2026 | 22 |
| Oct 15, 2026 | 24 |
| Oct 14, 2026 | 23 |
| Oct 13, 2026 | 24 |
| Oct 12, 2026 | 22 |
| Oct 11, 2026 | 38 |
| Oct 10, 2026 | 38 |
| Oct 9, 2026 | 25 |
| Oct 8, 2026 | 20 |
| Oct 7, 2026 | 18 |
| Oct 6, 2026 | 25 |
| Oct 5, 2026 | 26 |
| Oct 4, 2026 | 25 |
| Oct 3, 2026 | 26 |
| Oct 2, 2026 | 26 |
| Oct 1, 2026 | 27 |
| Sep 30, 2026 | 27 |
| Sep 29, 2026 | 27 |
| Sep 28, 2026 | 26 |
| Sep 27, 2026 | 11 |
| Sep 26, 2026 | 23 |
| Sep 25, 2026 | 25 |
| Sep 24, 2026 | 24 |
| Sep 23, 2026 | 38 |
| Sep 22, 2026 | 31 |
| Sep 21, 2026 | 47 |
| Sep 20, 2026 | 48 |
| Sep 19, 2026 | 37 |
| Sep 18, 2026 | 36 |
| Sep 17, 2026 | 45 |
| Sep 16, 2026 | 33 |
| Sep 15, 2026 | 32 |
| Sep 14, 2026 | 17 |
| Sep 13, 2026 | 18 |
| Sep 12, 2026 | 18 |
| Sep 11, 2026 | 17 |
| Sep 10, 2026 | 11 |
| Sep 9, 2026 | 12 |
| Sep 8, 2026 | 31 |
| Sep 7, 2026 | 31 |
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/1281664108-payload-images)<a href="https://payloaddirectory.dev/plugins/1281664108-payload-images"><img src="https://payloaddirectory.dev/badge/1281664108-payload-images.svg" alt="Payload Directory"></a>README
On-demand image optimization for Payload CMS — an Images collection that stores only the original and generates, crops, and caches each rendered size on first request, with a responsive <ResponsiveImage> component and admin focal-point picker.
pnpm add @pro-laico/payload-images
Requires Payload ^3, React 19, sharp, and Next.js 15+ (App Router). Not framework-agnostic: the transform endpoint, prewarming, and preset generation persist variants with Next's after().
Fetch images Sanity-style — seed createImageFor once with your app's Payload handle, then one
chain resolves the render-ready doc (src/srcset/alt/placeholder), ready to spread into
<ResponsiveImage>:
export const imageFor = createImageFor(getPayload({ config }))
const img = await imageFor(post.hero).aspectRatio('16:9').blur('md').fetch()
if (img) return <ResponsiveImage {...img} alt={img.alt ?? ''} sizes="50vw" />
Opt into smart prewarming (prewarm: true) and the endpoint learns which renders the site
actually serves, pre-generating exactly those variants for new/replaced images via a deferred
Payload Job — the first visitor never pays the transform.
Placeholders are a quality-tier ladder stored on the doc at upload time: five BlurHash
strings (xs…xl) plus two micro-webp data URIs (xxl/x3). They're opt-in per read: a
read that requests a blur (.blur('md') / context: { blur }) gets a finished, focal-cropped
data URI back from the virtual placeholder field — the processing happens in the field hook,
and <ResponsiveImage> just paints it. Reads that don't ask get null, so small images never
carry inline data-URI weight in the HTML. The same upload-time decode also stores a Sanity-style color palette,
hasAlpha/isOpaque flags, and a saliency-based initial focal point (applied only when the
editor hasn't picked one).
Images uploaded before the metadata hook carry no tiers/palette (reads degrade gracefully — no placeholder, nothing breaks). Stamp them once with the bundled command:
payload images:backfill # only images missing metadata (idempotent)
payload images:backfill --force # regenerate every image
payload images:backfill --focal # also set the saliency focal on docs still at 50/50
payload images:backfill --collection media # a custom source collection
--focal is opt-in because it changes crops on a live site. New uploads and file replacements
analyze themselves via the upload hook.
Ported from @pro-laico/images (Atomic Payload, MIT).
images
On-demand Sharp image transforms with focal-point cropping, built-in LQIP placeholders and a favicons collection
6032/wk37v3
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
mux video
Mux video upload and playback for Atomic Payload, wrapping the Oversight Studio Mux plugin
6443/wk37v3
image framing
Non-destructive crop and focus areas for Payload uploads, with per-usage overrides and responsive framing
6080/wk2v3