rubix-studios-pty-ltd

payload media

by rubix-studios-pty-ltd
Media & images
v4
^4.0.0-beta.0
MIT

Overview

Summary generated from the README

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.

Features

  • Image search across Unsplash, Pexels and Pixabay
  • Video search across Pexels and Pixabay
  • Provider-specific filters such as colour, orientation, size, category and ordering
  • Preview images and videos before importing into an upload collection
  • Configurable access function for the search endpoints
  • Caches successful search responses in browser storage for 24 hours

Use cases

  • Add royalty-free stock photos to a Payload media library without leaving the admin
  • Let editors pick stock videos for pages and import them as uploads
  • Restrict stock media search to authenticated users while enabling only chosen providers

From the author

A Payload CMS plugin that integrates with stock image and video providers including Unsplash, Pexels and Pixabay.

Installation

npm i @rubixstudios/payload-media

8

Stars

0

Forks

0

Open Issues

Yesterday

Last Updated

0

Weekly Downloads

v2.0.1

npm Version

90.4 KB

Unpacked Size

0

Dependencies

GitHub stars

Trends appear after 7 days of data. Daily snapshots have not started yet.

npm weekly downloads

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

68/100Good

Composite score based on GitHub activity, stars, npm downloads, publish recency, dependency count, and package size.

Badge for your README

Payload Directory health badge
Markdown
[![Payload Directory](https://payloaddirectory.dev/badge/1243543278-root.svg)](https://payloaddirectory.dev/plugins/1243543278-root)
HTML
<a href="https://payloaddirectory.dev/plugins/1243543278-root"><img src="https://payloaddirectory.dev/badge/1243543278-root.svg" alt="Payload Directory"></a>
Updated Oct 20, 2026Created May 19, 2026Published Oct 17, 2026

README

Payload CMS Media Plugin

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.

Stock image selection

Stock video selection

Compatibility

The plugin maintains two release lines, with Payload CMS v4 as the primary release and Payload CMS v3 maintained separately.

Payload CMSPlugin versionRelease branchnpm dist-tag
v42.xmainlatest
v31.xpayload-v3payload-v3

Install the release matching your Payload version. The latest tag targets Payload v4 after the v4 release is published.

Installation

Payload CMS v4

Install the latest release.

pnpm add @rubixstudios/payload-media

Payload CMS v3

Install from the dedicated v3 release channel.

pnpm add @rubixstudios/payload-media@payload-v3

Configuration

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.

Options

OptionTypeDefaultDescription
pexelsstring''Pexels API key
pixabaystring''Pixabay API key
unsplashstring''Unsplash access key
accessPayload AccessAuthenticated usersControls who may use the media search endpoints
disabledbooleanfalseDisables plugin registration

Provider API keys

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.

Features

  • Search stock images and videos inside Payload Admin upload collections.
  • Search images from Unsplash, Pexels, and Pixabay, and videos from Pexels and Pixabay.
  • Browse featured results or search by keyword.
  • Refine searches with provider-specific controls, including colour, orientation, size, image type, category, and ordering where supported.
  • Preview images and videos before selection.
  • Import a selected asset using Payload's upload controls.
  • Restrict access using a configurable Payload access function.
  • Cache successful search responses in browser storage for 24 hours.

Usage and liability

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.

Support

For support or enquiries, contact Rubix Studios or rubixvi on LinkedIn. You can also open an issue on GitHub.

License

Distributed under the MIT License.

Author

Rubix Studios

Acknowledgments

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.

Similar plugins