CloudinaryStorageOptions
Main configuration options for the Cloudinary storage plugin.Properties
Collections to apply the Cloudinary adapter to. Key is the collection slug, value is either
true or custom collection options.Cloudinary API credentials. See CloudinaryConfig.
Folder path in Cloudinary where files will be uploaded.
Whether to disable local storage. Plugin automatically sets this to
true for configured collections.Whether to enable the plugin. Set to
false to disable without removing the plugin.Versioning configuration. See CloudinaryVersioningOptions.
Public ID generation options. See PublicIDOptions.
Support for Dynamic Folder Mode. Uses
asset_folder parameter in upload to ensure correct folder display in Cloudinary Media Library.Additional custom Payload fields to add to media collections. These are merged with default Cloudinary fields.
Enable automatic PDF thumbnail generation in the admin UI.
CloudinaryConfig
Cloudinary API credentials configuration.Properties
Your Cloudinary cloud name. Find this in your Cloudinary dashboard.
Your Cloudinary API key.
Your Cloudinary API secret. Keep this secure and use environment variables.
Example
CloudinaryMetadata
Metadata stored in Payload documents for Cloudinary assets.Properties
The public identifier for the asset in Cloudinary.
Type of resource:
"image", "video", "raw", or "auto".File format (e.g.,
"jpg", "png", "pdf", "mp4").HTTPS URL to access the asset.
File size in bytes.
ISO 8601 timestamp of when the asset was created.
Duration in seconds (for video and audio files).
Width in pixels (for images and videos).
Height in pixels (for images and videos).
Eager transformations applied to the asset.
Cloudinary version identifier.
Unique version ID (when versioning is enabled).
Number of pages (for PDF files).
Selected page for thumbnail generation (for PDF files).
Direct URL to the asset thumbnail.
Upload type:
"upload", "private", or "authenticated".CloudinaryVersioningOptions
Configuration for Cloudinary versioning features.Properties
Whether to enable versioning support.
Whether to automatically invalidate old versions in CDN cache.
Whether to store version history in Payload CMS. When
true, adds a versions field to track all versions.Example
PublicIDOptions
Options for customizing Cloudinary public ID generation.Properties
Whether to enable custom public ID generation.
Whether to use the original filename as part of the public ID.
Whether to ensure unique filenames by adding a random suffix.
Custom function to generate a public ID. If provided, overrides
useFilename and uniqueFilename.Parameters:filename(string): The original filenameprefix(string | undefined): The file prefix (if any)folder(string | undefined): The base folder
PayloadDocument
Simplified Payload document type for use with thumbnails and transformations.Properties
Payload document ID.
Original filename of the uploaded asset.
Cloudinary metadata object. See CloudinaryMetadata.
Image size variations (for Payload image resizing).Each size object contains:
url(string): URL to the sized imagewidth(number): Width in pixelsheight(number): Height in pixels
CloudinaryAdapter
Type alias for the Cloudinary storage adapter.Adapter type from @payloadcms/plugin-cloud-storage/types.
CloudinaryStoragePlugin
Type for the main plugin function.Advanced Types
GenerateURLParams
Extended parameters for URL generation with Cloudinary-specific options.Specific version to retrieve.
Page number for PDF thumbnails.
Target format for conversion (e.g.,
"jpg", "png", "webp").CloudinaryURLResponse
Response object from URL generation.Generated Cloudinary URL.
Public ID of the asset.