finkinfridom

payload cloudinary plugin

by finkinfridom
Cloud storage
v2
^2.30.2
MIT

Overview

Summary generated from the README

Adds Cloudinary integration to Payload so uploaded media is sent to the Cloudinary service. It is set up with an Express middleware in the server file plus a plugin in the Payload config, and reads the cloud name, API key and API secret from environment variables. Targets Payload 2.x.

Features

  • Uploads media to Cloudinary using the cloudinary package
  • Accepts Cloudinary ConfigOptions and UploadApiOptions
  • Custom handler to choose the upload resource_type
  • Defaults to automatic resource type detection
  • Credentials configured via environment variables

Use cases

  • Store Payload media library files on Cloudinary instead of local disk
  • Serve images and videos from Cloudinary in a Payload 2.x project

From the author

Upload media to Cloudinary service

Installation

npm i payload-cloudinary-plugin

76

Stars

6

Forks

3

Open Issues

1 years ago

Last Updated

57

Weekly Downloads

v0.1.14

npm Version

23.8 KB

Unpacked Size

3

Dependencies

GitHub stars

760 since Sep 6

Show data
GitHub stars by day (UTC)
DateStars
Dec 5, 202676
Dec 4, 202676
Dec 3, 202676
Dec 2, 202676
Dec 1, 202676
Nov 30, 202676
Nov 29, 202676
Nov 28, 202676
Nov 27, 202676
Nov 26, 202676
Nov 25, 202676
Nov 24, 202676
Nov 23, 202676
Nov 22, 202676
Nov 21, 202676
Nov 20, 202676
Nov 19, 202676
Nov 18, 202676
Nov 17, 202676
Nov 16, 202676
Nov 15, 202676
Nov 14, 202676
Nov 13, 202676
Nov 12, 202676
Nov 11, 202676
Nov 10, 202676
Nov 9, 202676
Nov 8, 202676
Nov 7, 202676
Nov 6, 202676
Nov 5, 202676
Nov 4, 202676
Nov 3, 202676
Nov 2, 202676
Nov 1, 202676
Oct 31, 202676
Oct 30, 202676
Oct 29, 202676
Oct 28, 202676
Oct 27, 202676
Oct 26, 202676
Oct 25, 202677
Oct 24, 202677
Oct 23, 202677
Oct 22, 202677
Oct 21, 202676
Oct 20, 202676
Oct 19, 202676
Oct 18, 202676
Oct 17, 202676
Oct 16, 202676
Oct 15, 202676
Oct 14, 202676
Oct 13, 202676
Oct 12, 202676
Oct 11, 202676
Oct 10, 202676
Oct 9, 202676
Oct 8, 202676
Oct 7, 202676
Oct 6, 202676
Oct 5, 202676
Oct 4, 202676
Oct 3, 202676
Oct 2, 202676
Oct 1, 202676
Sep 30, 202676
Sep 29, 202676
Sep 28, 202676
Sep 27, 202676
Sep 26, 202676
Sep 25, 202676
Sep 24, 202676
Sep 23, 202676
Sep 22, 202676
Sep 21, 202676
Sep 20, 202676
Sep 19, 202676
Sep 18, 202676
Sep 17, 202676
Sep 16, 202676
Sep 15, 202676
Sep 14, 202676
Sep 13, 202676
Sep 12, 202676
Sep 11, 202676
Sep 10, 202676
Sep 9, 202676
Sep 8, 202676
Sep 7, 202676
Sep 6, 202676
npm weekly downloads

59+40 since Sep 6

Show data
npm weekly downloads by day (UTC)
DateWeekly downloads
Dec 5, 202659
Dec 4, 202617
Dec 3, 202617
Dec 2, 202617
Dec 1, 202618
Nov 30, 202619
Nov 29, 202638
Nov 28, 202637
Nov 27, 202634
Nov 26, 202633
Nov 25, 202632
Nov 24, 202632
Nov 23, 202629
Nov 22, 202611
Nov 21, 20269
Nov 20, 202615
Nov 19, 202616
Nov 18, 202637
Nov 17, 202636
Nov 16, 202642
Nov 15, 202641
Nov 14, 202643
Nov 13, 202641
Nov 12, 202658
Nov 11, 202638
Nov 10, 202638
Nov 9, 202633
Nov 8, 202630
Nov 7, 202628
Nov 6, 202626
Nov 5, 202613
Nov 4, 202615
Nov 3, 202617
Nov 2, 202621
Nov 1, 202622
Oct 31, 202624
Oct 30, 202623
Oct 29, 202617
Oct 28, 202613
Oct 27, 202612
Oct 26, 20268
Oct 25, 202630
Oct 24, 202630
Oct 23, 202628
Oct 22, 202631
Oct 21, 202632
Oct 20, 202631
Oct 19, 202630
Oct 18, 20268
Oct 17, 20267
Oct 16, 20268
Oct 15, 20266
Oct 14, 20267
Oct 13, 20268
Oct 12, 202625
Oct 11, 202628
Oct 10, 202628
Oct 9, 202628
Oct 8, 202627
Oct 7, 202629
Oct 6, 202628
Oct 5, 202611
Oct 4, 202610
Oct 3, 202613
Oct 2, 202615
Oct 1, 202625
Sep 30, 202627
Sep 29, 202651
Sep 28, 202653
Sep 27, 202651
Sep 26, 202650
Sep 25, 202648
Sep 24, 202640
Sep 23, 202634
Sep 22, 202633
Sep 21, 202634
Sep 20, 202637
Sep 19, 202638
Sep 18, 202638
Sep 17, 202639
Sep 16, 202640
Sep 15, 202618
Sep 14, 202618
Sep 13, 202616
Sep 12, 202615
Sep 11, 202618
Sep 10, 202616
Sep 9, 202616
Sep 8, 202621
Sep 7, 202619
Sep 6, 202619

Each point is npm's rolling 7-day download count.

Health Score

48/100Fair

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/557861535-root.svg)](https://payloaddirectory.dev/plugins/557861535-root)
HTML
<a href="https://payloaddirectory.dev/plugins/557861535-root"><img src="https://payloaddirectory.dev/badge/557861535-root.svg" alt="Payload Directory"></a>
Updated Mar 6, 2025Created Oct 26, 2022Published Sep 2, 2024

README

payload-cloudinary-plugin

Extends payloadcms with Cloudinary integration

Current status

codeql

test

publish

GitHub Super-Linter

Codacy Badge

Install

yarn add payload-cloudinary-plugin

Get Started

Set cloudinary environment variables

CLOUDINARY_CLOUD_NAME=<your cloud name>
CLOUDINARY_API_KEY=<your api key>
CLOUDINARY_API_SECRET=<your api secret>

server.ts

import { mediaManagement } from "payload-cloudinary-plugin";

app.use(mediaManagement());

payload.config.ts

import cloudinaryPlugin from "payload-cloudinary-plugin/dist/plugins";

export default buildConfig({
    ....
    plugins: [cloudinaryPlugin()]
    ....
})

mediaManagement function

function mediaManagement(
  config?: ConfigOptions,
  uploadApiOptions?: UploadApiOptions,
  uploadResourceTypeHandler?: Function
)

The function may receive a ConfigOptions and a UploadApiOptions from cloudinary package. Additionally, you can specify a uploadResourceTypeHandler to manage which resource_type parameter must be passed to cloudinary.upload (see here: https://cloudinary.com/documentation/image_upload_api_reference#upload_optional_parameters for additional information).

If the uploadResourceTypeHandler is NOT specified, resource_type: auto will be passed to upload method.

Similar plugins