Adds a Search media control to upload-enabled collections in the Payload admin. Editors can search or browse featured stock images and videos, apply provider filters, preview results and import the selected asset. Each provider is enabled by supplying its API key, and access to the search endpoints is controlled with a Payload access function. Version 2.x targets Payload v4 and 1.x targets 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
0
Forks
0
Open Issues
Yesterday
Last Updated
0
Weekly Downloads
v2.0.1
npm Version
90.4 KB
Unpacked Size
0
Dependencies
Trends appear after 7 days of data. Daily snapshots have not started yet.
Trends appear after 7 days of data. Daily snapshots have not started yet.
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, and Pixabay, 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 | 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 mediaPlugin in payload.config.ts. The plugin uses the same configuration options across both supported Payload versions.
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,
access: ({ req: { user } }) => Boolean(user),
disabled: false,
}),
],
})
Provide an API key only for the providers you want to enable. Configured providers appear in the search interface. The plugin adds a Search media control to collections with uploads enabled.
| Option | Type | Default | Description |
|---|---|---|---|
pexels | string | '' | Pexels API key |
pixabay | string | '' | Pixabay API key |
unsplash | string | '' | Unsplash access key |
access | Payload Access | Authenticated users | Controls who may use the media search endpoints |
disabled | boolean | false | Disables plugin registration |
Obtain API credentials from the relevant provider.
For Unsplash, use the application's Access Key, not its Secret Key. Keep credentials in server-side environment variables.
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.
For support or enquiries, contact Rubix Studios or rubixvi on LinkedIn. You can also open an issue on GitHub.
Distributed under the MIT License.
This project is an independent implementation derived from PayloadBites' Image Search by Riley Langbein, extended with provider-specific filters, video support, and Windows compatibility improvements.
Topics
payloadcms plugin image optimizer
Client-side pre-resize, ThumbHash blur placeholders, filename strategies and bulk regeneration for Payload image uploads
480/wk27v3
sirv payload
Use Sirv as a media source in the Payload admin and render assets on the frontend with @sirv/react
250v?
payload plugin aspect preview
Crop and focal point editing with live multi-aspect-ratio previews for Payload upload collections
7534/wk6v3
payload plugin media preview
Preview images, video, audio, code, CSV and Office files in the Payload admin list and edit views
7294/wk13v4
blur data urls
Generates blur placeholder data URLs for images uploaded to Payload media collections
6966/wk83v3
mux video
Mux video upload and playback for Atomic Payload, wrapping the Oversight Studio mux-video plugin
610/wk37v3