PHPackages                             junaidiar/imagekit-adapter - 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. junaidiar/imagekit-adapter

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

junaidiar/imagekit-adapter
==========================

File System adapter for ImageKit.

1.0.0(2y ago)077PHPPHP ^8.1

Since Aug 2Pushed 2y ago1 watchersCompare

[ Source](https://github.com/junaidiar19/php-imagekit-adapter)[ Packagist](https://packagist.org/packages/junaidiar/imagekit-adapter)[ RSS](/packages/junaidiar-imagekit-adapter/feed)WikiDiscussions master Synced yesterday

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

Filesystem adapter for the ImageKit API
=======================================

[](#filesystem-adapter-for-the-imagekit-api)

A configuration adapter for [ImageKit](https://imagekit.io/) inspired by [TaffoVelikof](https://github.com/TaffoVelikoff). This package can be used for php or Laravel project. Let's install to your project by the following instructions below:

Contents
--------

[](#contents)

[⚙️ Installation](#installation)

[🛠️ Setup imagekit.io](#setup)

[👩‍💻 Usage in PHP Native](#usage)

[🚀 Usage in Laravel](#usage-in-laravel)

[👩‍💻 Usage with CKEditor &amp; Laravel](#usage-with-ckeditor-laravel)

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

[](#installation)

You can install the package via composer:

```
composer require junaidiar/imagekit-adapter
```

Setup
-----

[](#setup)

First of all you have to sign up for an [ImageKit](https://imagekit.io/) account. Then you can go to  to get your public key, private key and url endpoint.

Usage in PHP Native
-------------------

[](#usage-in-php-native)

```
use ImageKit\ImageKit;
use League\Flysystem\Filesystem;
use JunaidiAR\ImageKitAdapter\ImageKitAdapter;

// Setup Client
$client = new ImageKit (
    'your_public_key',
    'your_private_key',
    'your_endpoint_url'
);

// Adapter
$adapter = new ImagekitAdapter($client);

// Filesystem
$fsys = new Filesystem($adapter);

// Check if file exists example
$file = $fsys->fileExists('default-image.jpg');
```

Usage in Laravel
----------------

[](#usage-in-laravel)

You can add a new driver by extending the Storage in the `boot()` method of `AppServiceProvider` like so.

```
public function boot()
{
    Storage::extend('imagekit', function ($app, $config) {
        $adapter = new ImagekitAdapter(
          new ImageKit(
              $config['key'],
              $config['secret'],
              $config['endpoint_url']
          ),
        );

        return new FilesystemAdapter(
            new Filesystem($adapter, $config),
            $adapter,
            $config
        );
    });
}
```

Then create a new disk in `config/filesystems.php`:

```
'disks' => [

  ...

  'imagekit' => [
      'driver' => 'imagekit',
      'key' => env('IMAGEKIT_PUBLIC_KEY'),
      'secret' => env('IMAGEKIT_PRIVATE_KEY'),
      'endpoint_url' => env('IMAGEKIT_ENDPOINT_URL'),
      'throw' => false,
  ]
]
```

Don't forget to add your keys in `.env`:

```
IMAGEKIT_PUBLIC_KEY=your-public-key
IMAGEKIT_PRIVATE_KEY=your-private-key
IMAGEKIT_ENDPOINT_URL=your-endpint-url
```

And now you can use Laravel's Storage facade:

```
$result = Storage::disk('imagekit')->put('index.txt', 'This is an index file.');
return response($result);
```

Usage with CKEditor &amp; Laravel
---------------------------------

[](#usage-with-ckeditor--laravel)

Install ckeditor 5 from the official documentation here  and make sure you have installed [Upload Adapter](https://ckeditor.com/docs/ckeditor5/latest/features/images/image-upload/simple-upload-adapter.html#installation)

or

you can download my starter pack using ckeditor 5 [Download Here](/assets/ckeditor5.zip)

then setup your client side like so:

```

  ClassicEditor.create(document.querySelector("#editor"), {
    simpleUpload: {
      // The URL that the images are uploaded to.
      uploadUrl: "{{ route('ckeditor.upload') . '?_token=' . csrf_token() }}",
    },
  }).catch(error => {
    console.error(error);
  });

```

then you can create the method controller like so:

```
public function upload(Request $request)
{
    if ($request->hasFile('upload')) {
        $request->validate([
            'upload' => 'image|mimes:jpeg,png,jpg|max:2048',
        ]);

        $file = $request->file('upload');

        $result = Storage::disk('imagekit')->put('ckeditor', $file);
        $url = env('IMAGEKIT_ENDPOINT_URL') . $result;
        return response()->json(['fileName' => $result, 'uploaded' => 1, 'url' => $url]);
    }
}
```

Ultimately you would see the magic if you click the insert image on the ckeditor toolbar.

Happy Coding Thank You :)

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

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

1066d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/38a80f7a384b65a5217ca75ad6d63cfb258b141b361a67b46814d1e4e8aff3e7?d=identicon)[junaidiar](/maintainers/junaidiar)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/junaidiar-imagekit-adapter/health.svg)

```
[![Health](https://phpackages.com/badges/junaidiar-imagekit-adapter/health.svg)](https://phpackages.com/packages/junaidiar-imagekit-adapter)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.8k543.8M20.1k](/packages/laravel-framework)[league/flysystem-aws-s3-v3

AWS S3 filesystem adapter for Flysystem.

1.7k285.7M1.0k](/packages/league-flysystem-aws-s3-v3)[unisharp/laravel-filemanager

A file upload/editor intended for use with Laravel 5 to 10 and CKEditor / TinyMCE

2.2k3.5M85](/packages/unisharp-laravel-filemanager)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[league/flysystem-bundle

Symfony bundle integrating Flysystem into Symfony applications

40432.5M136](/packages/league-flysystem-bundle)[alexusmai/laravel-file-manager

File manager for Laravel

1.2k803.2k9](/packages/alexusmai-laravel-file-manager)

PHPackages © 2026

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