PHPackages                             thomasvantuycom/flysystem-cloudinary - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. thomasvantuycom/flysystem-cloudinary

ActiveLibrary[File &amp; Storage](/categories/file-storage)

thomasvantuycom/flysystem-cloudinary
====================================

Cloudinary filesystem adapter for Flysystem.

v2.0.2(1y ago)216.2k—9.6%12MITPHPPHP ^8.0.2

Since Jan 25Pushed 1y ago1 watchersCompare

[ Source](https://github.com/thomasvantuycom/flysystem-cloudinary)[ Packagist](https://packagist.org/packages/thomasvantuycom/flysystem-cloudinary)[ GitHub Sponsors](https://github.com/sponsors/thomasvantuycom)[ RSS](/packages/thomasvantuycom-flysystem-cloudinary/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (8)Dependencies (6)Versions (9)Used By (2)

Flysystem adapter for Cloudinary
================================

[](#flysystem-adapter-for-cloudinary)

This is a [Flysystem](https://flysystem.thephpleague.com/docs/) adapter for [Cloudinary](https://cloudinary.com/). Although not the first of its kind, this package strives to be the ultimate and dependable Flysystem adapter for Cloudinary.

Installation
------------

[](#installation)

```
composer require thomasvantuycom/flysystem-cloudinary
```

Usage
-----

[](#usage)

Configure a Cloudinary client by supplying the cloud name, API key, and API secret accessible in the [Cloudinary console](https://console.cloudinary.com/pm/getting-started/). Then, pass the client to the adapter and initialize a new filesystem using the adapter.

```
use Cloudinary\Cloudinary;
use League\Flysystem\Filesystem;
use ThomasVantuycom\FlysystemCloudinary\CloudinaryAdapter;

$client = new Cloudinary([
    'cloud' => [
        'cloud_name' => 'CLOUD_NAME',
        'api_key' => 'API_KEY',
        'api_secret' => 'API_SECRET',
    ],
]);

$adapter = new CloudinaryAdapter($client);

$filesystem = new Filesystem($adapter);
```

### Storing assets in a subfolder

[](#storing-assets-in-a-subfolder)

By default, the root folder of the filesystem corresponds to Cloudinary's root folder. If you prefer to store your assets in a subfolder on Cloudinary, you can create a path-prefixed adapter.

```
use League\Flysystem\PathPrefixng\PathPrefixedAdapter;

$adapter = new CloudinaryAdapter($client, 'path/to/folder');
$pathPrefixedAdapter = new PathPrefixedAdapter($adapter, 'path/to/folder');
```

### Customizing mime type detection

[](#customizing-mime-type-detection)

By default, the adapter employs `League\MimeTypeDetection\FinfoMimeTypeDetector` for mime type detection and setting the resource type accordingly. If you wish to modify this behavior, you can supply a second argument to the Cloudinary adapter, implementing `League\MimeTypeDetection\MimeTypeDetector`.

```
$adapter = new CloudinaryAdapter($client, $mimeTypeDetector);
```

### Enabling fixed folder mode.

[](#enabling-fixed-folder-mode)

By default, the adapter operates under the assumption that your Cloudinary cloud uses dynamic folder mode. If you wish to support the legacy fixed folder mode, set the third argument to `false`.

```
$adapter = new CloudinaryAdapter($client, null, true);
```

Limitations
-----------

[](#limitations)

- The adapter heavily relies on the Cloudinary admin API to implement most of Flysystem's operations. Because the admin API has rate limits, you may run into timeouts. The Cloudinary API poses challenges in how it distinguishes between images, videos, and other assets, making the task of ensuring seamless operation across all file types quite intricate and expensive in API calls. It's important to highlight that deleting folders can be particularly resource-intensive.
- The adapter is compatible with Cloudinary's dynamic folders mode. However, it operates on the assumption that the public IDs of your assets do not include a path.

Testing
-------

[](#testing)

```
composer test
```

License
-------

[](#license)

The MIT License.

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance45

Moderate activity, may be stable

Popularity30

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~59 days

Recently: every ~73 days

Total

8

Last Release

424d ago

Major Versions

v1.0.4 → v2.0.02024-12-18

### Community

Maintainers

![](https://www.gravatar.com/avatar/adb88658036208affd371b76b342a46d6f7e201fb8d97a6e817857d792bb27aa?d=identicon)[thomasvantuycom](/maintainers/thomasvantuycom)

---

Top Contributors

[![thomasvantuycom](https://avatars.githubusercontent.com/u/107400578?v=4)](https://github.com/thomasvantuycom "thomasvantuycom (23 commits)")

---

Tags

filesystemFlysystemfilefilesstoragecloudinary

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleECS

Type Coverage Yes

### Embed Badge

![Health badge](/badges/thomasvantuycom-flysystem-cloudinary/health.svg)

```
[![Health](https://phpackages.com/badges/thomasvantuycom-flysystem-cloudinary/health.svg)](https://phpackages.com/packages/thomasvantuycom-flysystem-cloudinary)
```

###  Alternatives

[league/flysystem-aws-s3-v3

AWS S3 filesystem adapter for Flysystem.

1.6k263.6M790](/packages/league-flysystem-aws-s3-v3)[league/flysystem-local

Local filesystem adapter for Flysystem.

225231.8M39](/packages/league-flysystem-local)[league/flysystem-sftp-v3

SFTP filesystem adapter for Flysystem.

6129.6M91](/packages/league-flysystem-sftp-v3)[league/flysystem-async-aws-s3

AsyncAws S3 filesystem adapter for Flysystem.

2610.5M31](/packages/league-flysystem-async-aws-s3)[league/flysystem-memory

In-memory filesystem adapter for Flysystem.

8533.6M194](/packages/league-flysystem-memory)[league/flysystem-ziparchive

ZIP filesystem adapter for Flysystem.

1039.3M58](/packages/league-flysystem-ziparchive)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
