PHPackages                             jovialcore/cake-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. jovialcore/cake-cloudinary

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

jovialcore/cake-cloudinary
==========================

CakeCloudinary plugin for CakePHP

v1.0.0(3y ago)107MITPHPPHP &gt;=7.2

Since Apr 15Pushed 3y ago1 watchersCompare

[ Source](https://github.com/jovialcore/cake-cloudinary)[ Packagist](https://packagist.org/packages/jovialcore/cake-cloudinary)[ Docs](https://github.com/jovialcore/cake-cloudinary)[ RSS](/packages/jovialcore-cake-cloudinary/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (3)Versions (4)Used By (0)

CakePHP Cloudinary Plugin
=========================

[](#cakephp-cloudinary-plugin)

The CakePHP Cloudinary Plugin provides an easy-to-use wrapper for the Cloudinary PHP SDK to enable easy file uploads to your Cloudinary account in CakePHP projects.

Install the plugin using composer

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

[](#installation)

```
composer require jovialcore/cake-cloudinary
```

You will also need to configure the Cloudinary credentials in the `app.php` file:

```
// config/app_local.php
// In the return block, add:

    // ...
    'Cloudinary' => [
        'default' => [
            'cloud_name' => 'your_cloud_name',
            'api_key' => 'your_api_key',
            'api_secret' => 'your_api_secret',
            'secure' => true // use HTTPS
        ],
    ],
    // ...
];
```

Usage
-----

[](#usage)

To use the Cloudinary component in your controller, you need to load it in your `initialize` method:

```
// src/Controller/YourController.php

namespace App\Controller;

use Cake\Controller\Controller;
use Cake\Event\EventInterface;

class YourController extends Controller
{
    public function initialize(): void
    {
        parent::initialize();
        $this->loadComponent('CakeCloudinary.Cloudinary');
    }

    // ...
}
```

### Uploading an asset

[](#uploading-an-asset)

The `$file` parameter can be a file path, a `File` object or a `$this->request->getUploadedFiles()` | `$this->request->getUploadedFile();` object.

Quickily upload an asset and return a secure url

```
$this->Cloudinary->upload($file, ['getUrl' => 'true']);
```

Quickily upload a video asset and return a secure url

```
$this->Cloudinary->uploadVideo($file, ['getUrl' => 'true']);
```

Quickily upload any file (e.g, pdf, csv, etc) asset and return a secure url

```
$this->Cloudinary->uploadFile($file, ['getUrl' => 'true']);
```

The assets method can also take an array of options as second argument. The options array can include any of the options supported by the Cloudinary API. See the [Cloudinary PHP Image Upload API documentation](https://cloudinary.com/documentation/php_image_and_video_upload#server_side_upload) for a list of available options. Example:

```
$this->Cloudinary->upload($file,[
    'folder' => 'my_cloudinary_folder',
      'public_id' => 'my_video_name',
]);
```

The asset method/apis also returns a response object that contains the uploaded image's metadata, including its URL and public ID. You can retrieve the URL of the uploaded image using the `getUrl` or `getSecureUrl` methods of the Cloudinary component:

```
$url = $this->Cloudinary->getUrl(); // get url of uploaded file (http)

$secureUrl = $this->Cloudinary->getSecureUrl(); //  get secureUrl of the uploaded asst

$publicId = $this->Cloudinary->getPublicId(); // get public Id of the uploaded asset

$originalFIleName = $this->Cloudinary->getOriginalFileName(); // get the asset name before it was uploaded to cloudinary

$resourceType = $this->Cloudinary->getUploadedAt(); // get the time the asset as uploaded

$extension = $this->Cloudinary->getExtension(); // get file extension of the uploaded asset e.g jpg, .pdf, .png, etc

$fileType = $this->Cloudinary->getFileType(); // get asset type. E.g, image, video, etc.

$fileSize = $this->Cloudinary->getFileSize(); //get uploaded asset file's size by defaults, it returns a human readable file size like 20MB, 20kb, etc

// If you prefer to get just the raw bytes,
$fileizeInBytes = this->Cloudinary->getFileSize(['human_readable' => false]);

$height = $this->Cloudinary->getHeight(); // get asset height

$width = $this->Cloudinary->getWidth(); // get asset width
```

#### Delete assets

[](#delete-assets)

```
$res = $this->Cloudinary->delete($publidId);
```

#### Fetching remote assets

[](#fetching-remote-assets)

```
// get url from an asset

$url = $this->Cloudinary->fetchUrl($publicId);
```

Credits
-------

[](#credits)

- [Chidiebere Chukwudi](https://github.com/jovialcore)
- [All Contributors](../../contributors)

This plugin drew inspiration from the [Laravel Cloudinary Package](https://github.com/cloudinary-devs/cloudinary-laravel)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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

Unknown

Total

1

Last Release

1114d ago

### Community

Maintainers

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

---

Top Contributors

[![jovialcore](https://avatars.githubusercontent.com/u/32295501?v=4)](https://github.com/jovialcore "jovialcore (81 commits)")

---

Tags

cakephp-plugincloudinarycloudinary-sdkpackagephppluginphpcakephpfile uploadscloudinarycloudinary-php

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jovialcore-cake-cloudinary/health.svg)

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

###  Alternatives

[wyrihaximus/fly-pie

Flysystem integration plugin for CakePHP 5

38297.8k](/packages/wyrihaximus-fly-pie)[carlosocarvalho/flysystem-cloudinary

Flysystem adapter for Cloudinary

22154.8k5](/packages/carlosocarvalho-flysystem-cloudinary)[yoelpc4/laravel-cloudinary

Laravel Cloudinary filesystem cloud driver.

3343.0k](/packages/yoelpc4-laravel-cloudinary)[codebar-ag/laravel-flysystem-cloudinary

Cloudinary Flysystem v1 integration with Laravel

1224.9k2](/packages/codebar-ag-laravel-flysystem-cloudinary)[teepluss/cloudinary

Cloudinary API wrapper for Laravel 4

1810.5k](/packages/teepluss-cloudinary)[dereuromark/cakephp-file-storage

This plugin is giving you the possibility to store files in virtually any kind of storage backend. This plugin is wrapping the Gaufrette library (https://github.com/KnpLabs/Gaufrette) library in a CakePHP fashion and provides a simple way to use the storage adapters through the StorageManager class.

104.1k](/packages/dereuromark-cakephp-file-storage)

PHPackages © 2026

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