Adds stock image and video search to the Payload admin so editors can preview results and import selected media into upload collections. It supports Unsplash, Pexels, Pixabay and Openverse, with provider and licence filters. Configured through a plugin function with provider API keys; the 2.x line targets Payload v4 and the 1.x line targets Payload v3.
A Payload CMS plugin that integrates with stock image and video providers including Unsplash, Pexels and Pixabay.
Installation
npm i @rubixstudios/payload-media8
Stars
1
Forks
0
Open Issues
Today
Last Updated
900
Weekly Downloads
v3.0.2
npm Version
141.3 KB
Unpacked Size
0
Dependencies
8+2 since Sep 7
| Date | Stars |
|---|---|
| Dec 6, 2026 | 8 |
| Dec 5, 2026 | 8 |
| Dec 4, 2026 | 8 |
| Dec 3, 2026 | 8 |
| Dec 2, 2026 | 8 |
| Dec 1, 2026 | 8 |
| Nov 30, 2026 | 8 |
| Nov 29, 2026 | 8 |
| Nov 28, 2026 | 8 |
| Nov 27, 2026 | 8 |
| Nov 26, 2026 | 8 |
| Nov 25, 2026 | 8 |
| Nov 24, 2026 | 8 |
| Nov 23, 2026 | 8 |
| Nov 22, 2026 | 8 |
| Nov 21, 2026 | 8 |
| Nov 20, 2026 | 8 |
| Nov 19, 2026 | 8 |
| Nov 18, 2026 | 8 |
| Nov 17, 2026 | 8 |
| Nov 16, 2026 | 8 |
| Nov 15, 2026 | 8 |
| Nov 14, 2026 | 8 |
| Nov 13, 2026 | 8 |
| Nov 12, 2026 | 8 |
| Nov 11, 2026 | 8 |
| Nov 10, 2026 | 8 |
| Nov 9, 2026 | 8 |
| Nov 8, 2026 | 8 |
| Nov 7, 2026 | 8 |
| Nov 6, 2026 | 8 |
| Nov 5, 2026 | 8 |
| Nov 4, 2026 | 8 |
| Nov 3, 2026 | 8 |
| Nov 2, 2026 | 8 |
| Nov 1, 2026 | 8 |
| Oct 31, 2026 | 8 |
| Oct 30, 2026 | 8 |
| Oct 29, 2026 | 8 |
| Oct 28, 2026 | 8 |
| Oct 27, 2026 | 8 |
| Oct 26, 2026 | 8 |
| Oct 25, 2026 | 8 |
| Oct 24, 2026 | 8 |
| Oct 23, 2026 | 8 |
| Oct 22, 2026 | 8 |
| Oct 21, 2026 | 8 |
| Oct 20, 2026 | 8 |
| Oct 19, 2026 | 8 |
| Oct 18, 2026 | 8 |
| Oct 17, 2026 | 8 |
| Oct 16, 2026 | 8 |
| Oct 15, 2026 | 8 |
| Oct 14, 2026 | 8 |
| Oct 13, 2026 | 8 |
| Oct 12, 2026 | 7 |
| Oct 11, 2026 | 7 |
| Oct 10, 2026 | 6 |
| Oct 9, 2026 | 6 |
| Oct 8, 2026 | 6 |
| Oct 7, 2026 | 6 |
| Oct 6, 2026 | 6 |
| Oct 5, 2026 | 6 |
| Oct 4, 2026 | 6 |
| Oct 3, 2026 | 6 |
| Oct 2, 2026 | 6 |
| Oct 1, 2026 | 6 |
| Sep 30, 2026 | 6 |
| Sep 29, 2026 | 6 |
| Sep 28, 2026 | 6 |
| Sep 27, 2026 | 6 |
| Sep 26, 2026 | 6 |
| Sep 25, 2026 | 6 |
| Sep 24, 2026 | 6 |
| Sep 23, 2026 | 6 |
| Sep 22, 2026 | 6 |
| Sep 21, 2026 | 6 |
| Sep 20, 2026 | 6 |
| Sep 19, 2026 | 6 |
| Sep 18, 2026 | 6 |
| Sep 17, 2026 | 6 |
| Sep 16, 2026 | 6 |
| Sep 15, 2026 | 6 |
| Sep 14, 2026 | 6 |
| Sep 13, 2026 | 6 |
| Sep 12, 2026 | 6 |
| Sep 11, 2026 | 6 |
| Sep 10, 2026 | 6 |
| Sep 9, 2026 | 6 |
| Sep 8, 2026 | 6 |
| Sep 7, 2026 | 6 |
766+579 since Sep 7
| Date | Weekly downloads |
|---|---|
| Dec 6, 2026 | 766 |
| Dec 5, 2026 | 783 |
| Dec 4, 2026 | 803 |
| Dec 3, 2026 | 917 |
| Dec 2, 2026 | 888 |
| Dec 1, 2026 | 873 |
| Nov 30, 2026 | 1,137 |
| Nov 29, 2026 | 1,079 |
| Nov 28, 2026 | 1,056 |
| Nov 27, 2026 | 1,164 |
| Nov 26, 2026 | 764 |
| Nov 25, 2026 | 748 |
| Nov 24, 2026 | 746 |
| Nov 23, 2026 | 637 |
| Nov 22, 2026 | 652 |
| Nov 21, 2026 | 980 |
| Nov 20, 2026 | 1,159 |
| Nov 19, 2026 | 977 |
| Nov 18, 2026 | 1,041 |
| Nov 17, 2026 | 1,040 |
| Nov 16, 2026 | 893 |
| Nov 15, 2026 | 876 |
| Nov 14, 2026 | 560 |
| Nov 13, 2026 | 367 |
| Nov 12, 2026 | 389 |
| Nov 11, 2026 | 521 |
| Nov 10, 2026 | 575 |
| Nov 9, 2026 | 578 |
| Nov 8, 2026 | 580 |
| Nov 7, 2026 | 586 |
| Nov 6, 2026 | 489 |
| Nov 5, 2026 | 460 |
| Nov 4, 2026 | 349 |
| Nov 3, 2026 | 279 |
| Nov 2, 2026 | 275 |
| Nov 1, 2026 | 837 |
| Oct 31, 2026 | 807 |
| Oct 30, 2026 | 768 |
| Oct 29, 2026 | 750 |
| Oct 28, 2026 | 656 |
| Oct 27, 2026 | 673 |
| Oct 26, 2026 | 824 |
| Oct 25, 2026 | 249 |
| Oct 24, 2026 | 242 |
| Oct 23, 2026 | 227 |
| Oct 22, 2026 | 249 |
| Oct 21, 2026 | 332 |
| Oct 20, 2026 | 344 |
| Oct 19, 2026 | 583 |
| Oct 18, 2026 | 585 |
| Oct 17, 2026 | 616 |
| Oct 16, 2026 | 806 |
| Oct 15, 2026 | 797 |
| Oct 14, 2026 | 734 |
| Oct 13, 2026 | 726 |
| Oct 12, 2026 | 347 |
| Oct 11, 2026 | 352 |
| Oct 10, 2026 | 332 |
| Oct 9, 2026 | 168 |
| Oct 8, 2026 | 202 |
| Oct 7, 2026 | 205 |
| Oct 6, 2026 | 173 |
| Oct 5, 2026 | 143 |
| Oct 4, 2026 | 140 |
| Oct 3, 2026 | 130 |
| Oct 2, 2026 | 130 |
| Oct 1, 2026 | 108 |
| Sep 30, 2026 | 112 |
| Sep 29, 2026 | 125 |
| Sep 28, 2026 | 134 |
| Sep 27, 2026 | 277 |
| Sep 26, 2026 | 287 |
| Sep 25, 2026 | 269 |
| Sep 24, 2026 | 271 |
| Sep 23, 2026 | 307 |
| Sep 22, 2026 | 302 |
| Sep 21, 2026 | 296 |
| Sep 20, 2026 | 149 |
| Sep 19, 2026 | 152 |
| Sep 18, 2026 | 189 |
| Sep 17, 2026 | 199 |
| Sep 16, 2026 | 183 |
| Sep 15, 2026 | 182 |
| Sep 14, 2026 | 185 |
| Sep 13, 2026 | 180 |
| Sep 12, 2026 | 179 |
| Sep 11, 2026 | 156 |
| Sep 10, 2026 | 159 |
| Sep 9, 2026 | 168 |
| Sep 8, 2026 | 196 |
| Sep 7, 2026 | 187 |
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/1243543278-root)<a href="https://payloaddirectory.dev/plugins/1243543278-root"><img src="https://payloaddirectory.dev/badge/1243543278-root.svg" alt="Payload Directory"></a>README
Payload CMS Media Plugin adds stock image and video search to the Payload Admin interface. Search Unsplash, Pexels, Pixabay and Openverse, apply provider-specific filters, preview results, and import selected media into upload collections.
The plugin maintains two release lines, with Payload CMS v4 as the primary release and Payload CMS v3 maintained separately.
| Payload CMS | Plugin version | Release branch | npm dist-tag |
|---|---|---|---|
| v4 | 2.x and later | main | latest |
| v3 | 1.x | payload-v3 | payload-v3 |
Install the release matching your Payload version. The latest tag targets Payload v4 after the v4 release is published.
Install the latest release.
pnpm add @rubixstudios/payload-media
Install from the dedicated v3 release channel.
pnpm add @rubixstudios/payload-media@payload-v3
Register the plugin in payload.config.ts. The following options apply to the updated Payload v4 release.
import { buildConfig } from 'payload'
import { mediaPlugin } from '@rubixstudios/payload-media'
export default buildConfig({
plugins: [
mediaPlugin({
pexels: process.env.API_KEY_PEXELS,
pixabay: process.env.API_KEY_PIXABAY,
unsplash: process.env.API_KEY_UNSPLASH,
openverse: true,
collections: ['media'],
attribution: true,
}),
],
})
| Option | Default | Description |
|---|---|---|
pexels | Disabled | Pexels API key |
pixabay | Disabled | Pixabay API key |
unsplash | Disabled | Unsplash access key |
openverse | false | Enable Openverse images and optional application registration |
collections | All upload collections | Slugs receiving the media search control |
attribution | false | Add editable mediaAttribution metadata to selected collections |
access | Admin auth collection | Custom Payload access function returning a boolean |
rateLimit | Unset | Optional callback receiving { req, provider, operation }; return false to reject |
disabled | false | Disable plugin registration |
Enable openverse: true to search anonymously immediately. Select Connect Openverse in the media drawer to register an application using the signed-in administrator's email address. Verify the email sent by Openverse to unlock higher limits.
The application is shared across authorised users. Credentials are encrypted using AES-256-GCM and persisted in the hidden payload-media-credentials collection. OAuth tokens are cached in server memory and renewed automatically. No extra environment variables are required.
Existing application credentials can be configured directly, without automatic registration:
openverse: {
clientId: process.env.OPENVERSE_CLIENT_ID!,
clientSecret: process.env.OPENVERSE_CLIENT_SECRET!,
},
For automatic registration, an optional encryptionSecret can replace the Payload secret. Keep it consistent across replicas and backups. Changing or losing the key prevents decryption of stored credentials.
A unique database index on the internal collection's key field is required before registration. If registration fails after the reservation is created, the plugin deliberately retains the reservation to prevent duplicate external applications. Review the provider state before resetting it or configuring existing credentials.
Keep credentials server-side. For Unsplash, use the application's access key rather than its secret key.
The updated release defaults to the configured admin authentication collection. Custom access functions must return true for authenticated users. Download tracking now uses POST /api/providers/unsplash/track-download with a JSON url property. Search responses are no longer persisted in browser storage across sessions.
Regenerate the admin import map and Payload types. SQL adapters require a migration when enabling automatic Openverse registration or attribution fields. Verify the unique registration index before connecting Openverse.
Remote imports continue to use Payload's native upload controls. Configure pasteURL.allowList for trusted sources when server-side fetching is required; never allow unrestricted external fetching. Openverse indexes multiple source hosts, so some assets may require manual download or a trusted allowlist entry. Review attribution when replacing an existing file.
Media availability, licensing, attribution, and permitted uses depend on the source provider. Review the applicable provider terms and licence conditions before using imported assets.
Rubix Studios, its developers, and contributors bear no responsibility for how imported media is used.
This project is licensed under the MIT License - see the LICENSE file for details.
For support or inquiries:
Rubix Studios
https://rubixstudios.com.au
Topics
payload images
Search Unsplash, Pexels and Pixabay stock images from the Payload admin and import them into your media library
0129/wk7v3
image search
Search and import stock images from Unsplash, Pexels and Pixabay inside the Payload admin
861.1k/wk115v4
mux video
Mux video upload and playback for Atomic Payload, wrapping the Oversight Studio Mux plugin
6443/wk37v3
payload mux
Mux Video integration for Payload with a Videos collection that uploads directly to Mux
58133/wk18v3
sirv payload
Use Sirv as a media source in the Payload admin and render assets on the frontend with @sirv/react
250v?
mux video
Upload and manage Mux videos from a dedicated Payload collection with public or signed playback
793.9k/wk84v3