The official Payload plugin that moves uploaded media from local disk to external storage. It is configured per upload collection with an adapter, and supports Azure, S3-style, Google Cloud Storage and Vercel Blob adapters or custom adapters. For Payload 3.0 the dedicated storage packages are recommended for those services, so this package suits custom or unsupported providers.
The official cloud storage plugin for Payload CMS
Installation
npm i @payloadcms/plugin-cloud-storage46.1k
Stars
4.5k
Forks
1821
Open Issues
Today
Last Updated
1.0M
Weekly Downloads
v3.94.2
npm Version
318.1 KB
Unpacked Size
3
Dependencies
46.1K+1.8K since Sep 6
| Date | Stars |
|---|---|
| Dec 5, 2026 | 46,136 |
| Dec 4, 2026 | 46,125 |
| Dec 3, 2026 | 46,106 |
| Dec 2, 2026 | 46,087 |
| Dec 1, 2026 | 46,068 |
| Nov 30, 2026 | 46,059 |
| Nov 29, 2026 | 46,037 |
| Nov 28, 2026 | 46,035 |
| Nov 27, 2026 | 46,022 |
| Nov 26, 2026 | 46,012 |
| Nov 25, 2026 | 45,993 |
| Nov 24, 2026 | 45,976 |
| Nov 23, 2026 | 45,958 |
| Nov 22, 2026 | 45,947 |
| Nov 21, 2026 | 45,937 |
| Nov 20, 2026 | 45,926 |
| Nov 19, 2026 | 45,901 |
| Nov 18, 2026 | 45,868 |
| Nov 17, 2026 | 45,852 |
| Nov 16, 2026 | 45,831 |
| Nov 15, 2026 | 45,820 |
| Nov 14, 2026 | 45,807 |
| Nov 13, 2026 | 45,792 |
| Nov 12, 2026 | 45,779 |
| Nov 11, 2026 | 45,763 |
| Nov 10, 2026 | 45,742 |
| Nov 9, 2026 | 45,731 |
| Nov 8, 2026 | 45,722 |
| Nov 7, 2026 | 45,704 |
| Nov 6, 2026 | 45,681 |
| Nov 5, 2026 | 45,670 |
| Nov 4, 2026 | 45,647 |
| Nov 3, 2026 | 45,629 |
| Nov 2, 2026 | 45,611 |
| Nov 1, 2026 | 45,603 |
| Oct 31, 2026 | 45,592 |
| Oct 30, 2026 | 45,574 |
| Oct 29, 2026 | 45,561 |
| Oct 28, 2026 | 45,543 |
| Oct 27, 2026 | 45,519 |
| Oct 26, 2026 | 45,492 |
| Oct 25, 2026 | 45,472 |
| Oct 24, 2026 | 45,449 |
| Oct 23, 2026 | 45,430 |
| Oct 22, 2026 | 45,405 |
| Oct 21, 2026 | 45,259 |
| Oct 20, 2026 | 45,239 |
| Oct 19, 2026 | 45,213 |
| Oct 18, 2026 | 45,192 |
| Oct 17, 2026 | 45,165 |
| Oct 16, 2026 | 45,148 |
| Oct 15, 2026 | 45,122 |
| Oct 14, 2026 | 45,100 |
| Oct 13, 2026 | 45,082 |
| Oct 12, 2026 | 45,057 |
| Oct 11, 2026 | 45,032 |
| Oct 10, 2026 | 45,023 |
| Oct 9, 2026 | 45,003 |
| Oct 8, 2026 | 44,983 |
| Oct 7, 2026 | 44,959 |
| Oct 6, 2026 | 44,935 |
| Oct 5, 2026 | 44,924 |
| Oct 4, 2026 | 44,907 |
| Oct 3, 2026 | 44,891 |
| Oct 2, 2026 | 44,876 |
| Oct 1, 2026 | 44,859 |
| Sep 30, 2026 | 44,846 |
| Sep 29, 2026 | 44,829 |
| Sep 28, 2026 | 44,805 |
| Sep 27, 2026 | 44,787 |
| Sep 26, 2026 | 44,769 |
| Sep 25, 2026 | 44,737 |
| Sep 24, 2026 | 44,709 |
| Sep 23, 2026 | 44,691 |
| Sep 22, 2026 | 44,669 |
| Sep 21, 2026 | 44,641 |
| Sep 20, 2026 | 44,628 |
| Sep 19, 2026 | 44,609 |
| Sep 18, 2026 | 44,595 |
| Sep 17, 2026 | 44,570 |
| Sep 16, 2026 | 44,548 |
| Sep 15, 2026 | 44,523 |
| Sep 14, 2026 | 44,501 |
| Sep 13, 2026 | 44,488 |
| Sep 12, 2026 | 44,470 |
| Sep 11, 2026 | 44,447 |
| Sep 10, 2026 | 44,427 |
| Sep 9, 2026 | 44,402 |
| Sep 8, 2026 | 44,384 |
| Sep 7, 2026 | 44,364 |
| Sep 6, 2026 | 44,352 |
Shared by 12 plugins in payloadcms/payload.
947.7K+394.4K since Sep 6
| Date | Weekly downloads |
|---|---|
| Dec 5, 2026 | 947,695 |
| Dec 4, 2026 | 924,901 |
| Dec 3, 2026 | 906,183 |
| Dec 2, 2026 | 927,844 |
| Dec 1, 2026 | 939,529 |
| Nov 30, 2026 | 950,713 |
| Nov 29, 2026 | 993,314 |
| Nov 28, 2026 | 1,038,504 |
| Nov 27, 2026 | 1,064,682 |
| Nov 26, 2026 | 1,093,403 |
| Nov 25, 2026 | 1,089,467 |
| Nov 24, 2026 | 1,092,830 |
| Nov 23, 2026 | 1,102,201 |
| Nov 22, 2026 | 1,099,070 |
| Nov 21, 2026 | 1,105,785 |
| Nov 20, 2026 | 1,093,953 |
| Nov 19, 2026 | 1,071,357 |
| Nov 18, 2026 | 1,053,308 |
| Nov 17, 2026 | 1,039,503 |
| Nov 16, 2026 | 1,023,624 |
| Nov 15, 2026 | 1,014,656 |
| Nov 14, 2026 | 1,018,942 |
| Nov 13, 2026 | 1,063,855 |
| Nov 12, 2026 | 1,082,860 |
| Nov 11, 2026 | 1,087,039 |
| Nov 10, 2026 | 1,102,071 |
| Nov 9, 2026 | 1,110,006 |
| Nov 8, 2026 | 1,119,371 |
| Nov 7, 2026 | 1,115,008 |
| Nov 6, 2026 | 1,082,953 |
| Nov 5, 2026 | 1,072,773 |
| Nov 4, 2026 | 1,082,943 |
| Nov 3, 2026 | 1,081,892 |
| Nov 2, 2026 | 1,094,189 |
| Nov 1, 2026 | 1,102,568 |
| Oct 31, 2026 | 1,088,284 |
| Oct 30, 2026 | 1,061,540 |
| Oct 29, 2026 | 874,195 |
| Oct 28, 2026 | 694,182 |
| Oct 27, 2026 | 681,221 |
| Oct 26, 2026 | 663,735 |
| Oct 25, 2026 | 634,906 |
| Oct 24, 2026 | 611,987 |
| Oct 23, 2026 | 450,064 |
| Oct 22, 2026 | 609,896 |
| Oct 21, 2026 | 735,060 |
| Oct 20, 2026 | 723,490 |
| Oct 19, 2026 | 700,730 |
| Oct 18, 2026 | 676,174 |
| Oct 17, 2026 | 663,924 |
| Oct 16, 2026 | 803,002 |
| Oct 15, 2026 | 784,341 |
| Oct 14, 2026 | 784,055 |
| Oct 13, 2026 | 774,304 |
| Oct 12, 2026 | 780,647 |
| Oct 11, 2026 | 771,304 |
| Oct 10, 2026 | 768,704 |
| Oct 9, 2026 | 753,454 |
| Oct 8, 2026 | 737,278 |
| Oct 7, 2026 | 734,898 |
| Oct 6, 2026 | 738,296 |
| Oct 5, 2026 | 729,588 |
| Oct 4, 2026 | 725,908 |
| Oct 3, 2026 | 711,985 |
| Oct 2, 2026 | 722,617 |
| Oct 1, 2026 | 713,876 |
| Sep 30, 2026 | 699,973 |
| Sep 29, 2026 | 687,070 |
| Sep 28, 2026 | 677,992 |
| Sep 27, 2026 | 662,087 |
| Sep 26, 2026 | 640,774 |
| Sep 25, 2026 | 609,244 |
| Sep 24, 2026 | 600,237 |
| Sep 23, 2026 | 593,747 |
| Sep 22, 2026 | 590,648 |
| Sep 21, 2026 | 589,082 |
| Sep 20, 2026 | 599,233 |
| Sep 19, 2026 | 606,085 |
| Sep 18, 2026 | 607,256 |
| Sep 17, 2026 | 598,040 |
| Sep 16, 2026 | 576,710 |
| Sep 15, 2026 | 579,806 |
| Sep 14, 2026 | 588,010 |
| Sep 13, 2026 | 572,108 |
| Sep 12, 2026 | 563,676 |
| Sep 11, 2026 | 565,026 |
| Sep 10, 2026 | 566,879 |
| Sep 9, 2026 | 572,562 |
| Sep 8, 2026 | 570,878 |
| Sep 7, 2026 | 557,238 |
| Sep 6, 2026 | 553,341 |
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/official-plugin-cloud-storage)<a href="https://payloaddirectory.dev/plugins/official-plugin-cloud-storage"><img src="https://payloaddirectory.dev/badge/official-plugin-cloud-storage.svg" alt="Payload Directory"></a>README
This repository contains the officially supported Payload Cloud Storage plugin. It extends Payload to allow you to store all uploaded media in third-party permanent storage.
NOTE: If you are using Payload 3.0 and one of the following storage services, you should use one of following packages instead of this one:
| Service | Package |
|---|---|
| Vercel Blob | @payloadcms/storage-vercel-blob |
| AWS S3 | @payloadcms/storage-s3 |
| Azure | @payloadcms/storage-azure |
| Google Cloud Storage | @payloadcms/storage-gcs |
This package is now best used for implementing custom storage solutions or third-party storage services that do not have @payloadcms/storage-* packages.
pnpm add @payloadcms/plugin-cloud-storage
import { buildConfig } from 'payload'
import { cloudStoragePlugin } from '@payloadcms/plugin-cloud-storage'
export default buildConfig({
plugins: [
cloudStoragePlugin({
collections: {
'my-collection-slug': {
adapter: theAdapterToUse, // see docs for the adapter you want to use
},
},
}),
],
// The rest of your config goes here
})
The proper way to conditionally enable/disable this plugin is to use the enabled property.
cloudStoragePlugin({
enabled: process.env.MY_CONDITION === 'true',
collections: {
'my-collection-slug': {
adapter: theAdapterToUse, // see docs for the adapter you want to use
},
},
}),
If the code is included in any way in your config but conditionally disabled in another fashion, you may run into issues such as Webpack Build Error: Can't Resolve 'fs' and 'stream' or similar because the plugin must be run at all times in order to properly extend the webpack config.
Adapter-based Implementation
This plugin supports the following adapters:
However, you can create your own adapter for any third-party service you would like to use.
All adapters are implemented dev directory's Payload Config. See this file for examples.
This plugin is configurable to work across many different Payload collections. A * denotes that the property is required.
| Option | Type | Description |
|---|---|---|
collections * | Record<string, CollectionOptions> | Object with keys set to the slug of collections you want to enable the plugin for, and values set to collection-specific options. |
enabled | boolean to conditionally enable/disable plugin. Default: true. |
Collection-specific options:
| Option | Type | Description |
|---|---|---|
adapter * | Adapter | Pass in the adapter that you'd like to use for this collection. You can also set this field to null for local development if you'd like to bypass cloud storage in certain scenarios and use local storage. |
disableLocalStorage | boolean | Choose to disable local storage on this collection. Defaults to true. |
disablePayloadAccessControl | true | Set to true to disable Payload's access control. More |
prefix | string | Set to media/images to upload files inside media/images folder in the bucket. |
generateFileURL | GenerateFileURL | Override the generated file URL with one that you create. |
Payload ships with access control that runs even on statically served files. The same read access control property on your upload-enabled collections is used, and it allows you to restrict who can request your uploaded files.
To preserve this feature, by default, this plugin keeps all file URLs exactly the same. Your file URLs won't be updated to point directly to your cloud storage source, as in that case, Payload's access control will be completely bypassed and you would need public readability on your cloud-hosted files.
Instead, all uploads will still be reached from the default /:collectionSlug/file/:filename path. This plugin will "pass through" all files that are hosted on your third-party cloud service—with the added benefit of keeping your existing access control in place.
If this does not apply to you (your upload collection has read: () => true or similar) you can disable this functionality by setting disablePayloadAccessControl to true. When this setting is in place, this plugin will update your file URLs to point directly to your cloud host.
disablePayloadAccessControl does not disable safe outbound fetching. If Payload needs to fetch files from a private or internal storage endpoint, configure the upload collection's skipSafeFetch option with an explicit allowlist for the trusted destination. Set skipSafeFetch: true only when every URL accepted by the collection is trusted.
This plugin was created with significant help, and code, from Alex Bechmann and Richard VanBergen. Thank you!!
Topics
payload storage file explorer
Admin file explorer for browsing and managing S3-compatible buckets inside the Payload admin panel
4532/wk12v3
payload storage sanity
Store Payload media uploads in Sanity Content Lake with crops, focal points and video posters
721.2k/wk0v3
payload plugin backup postgres
Scheduled and on-demand PostgreSQL backups with selective restore, stored in Vercel Blob or S3-compatible storage
72118/wk3v3
payload plugin janitor
Find orphaned files, missing uploads and unused documents, then delete only what you approve
5610/wk7v4
payload plugin backup mongodb
MongoDB backup and restore for Payload with Vercel Blob or S3-compatible storage and an admin dashboard
5484/wk8v3
payload s3 upload
Send Payload CMS uploads and resized image variants to Amazon S3 with per-collection configuration
48244/wk70v1