PHPackages                             nuhel/filament-cropper - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. nuhel/filament-cropper

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

nuhel/filament-cropper
======================

Cropper Js Implementation for Filament

1.1.2(3y ago)3658.7k↓35%11[10 issues](https://github.com/Nuhel/filament-cropper/issues)MITBladePHP ^8.1

Since Dec 25Pushed 3y ago1 watchersCompare

[ Source](https://github.com/Nuhel/filament-cropper)[ Packagist](https://packagist.org/packages/nuhel/filament-cropper)[ RSS](/packages/nuhel-filament-cropper/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)Dependencies (1)Versions (8)Used By (0)

Filament Cropper Plugin
=======================

[](#filament-cropper-plugin)

[![Latest Version on Packagist](https://camo.githubusercontent.com/f0e5183f132da135255a17970d605704d8f90e29c20d970796810d7bbd949080/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e7568656c2f66696c616d656e742d63726f707065722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/nuhel/filament-cropper)[![Total Downloads](https://camo.githubusercontent.com/5c1d6049be5eab528c24701953833891b4efbda1b9cf38a30c0d2999241633c3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e7568656c2f66696c616d656e742d63726f707065722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/nuhel/filament-cropper)

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

[](#installation)

You can install the package via composer:

```
composer require nuhel/filament-cropper
```

This field has most of the same functionality of the [Filament File Upload](https://filamentphp.com/docs/2.x/forms/fields#file-upload) field.

[![screenshot of square croppie](./images/example.png)](./images/example.png)

```
  Cropper::make('image')
      ->getUploadedFileNameForStorageUsing(function (TemporaryUploadedFile $file): string {
          return (string)str("image_path/" . $file->hashName());
      })->enableDownload()
      ->enableOpen()
      ->enableImageRotation()
      ->enableImageFlipping()
      ->imageCropAspectRatio('16:9'),
```

Using `imageCropAspectRatio` we can set aspect ratio of the cropper.

```
Cropper::make('avatar')
        ->avatar()
        ->enableOpen()
        ->enableDownload()
        ->modalSize('xl'),
```

We can make cropper circular using `avatar` method. [![screenshot of big modal](./images/circural-example.png)](./images/circural-example.png)

Modal size can be customized if it is needed, using `modalSize` method.

```
Cropper::make('avatar')
        ->avatar()
        ->enableOpen()
        ->enableDownload()
        ->modalSize('xl')
        ->modalHeading("Crop Background Image")
```

[![screenshot of big modal](./images/xl-modal-example.png)](./images/xl-modal-example.png)

`List of available options`

```
Cropper::make('image')
            ->modalSize('xl')
            ->modalHeading("Crop Background Image")
            ->enableImageRotation()
            ->rotationalStep(5)
            ->enableImageFlipping()
            ->enabledAspectRatios([
                '2:3', '9:16', '5:5'
            ])
            ->zoomable(true)
            ->enableZoomButtons()
            ->enableAspectRatioFreeMode()
            ->imageCropAspectRatio('4:9')
```

[![screenshot of big modal](./images/all-options.png)](./images/all-options.png)

Thumbnail Image
---------------

[](#thumbnail-image)

Now You generate Thumbnail Image using `generateThumbnailImage()` method.

```
Cropper::make('avatar')
		->enableOpen()
		->enableDownload()
		->generateThumbnailImage(),
```

By default, it's use **thumbnailImages** Folder to store Generated Thumbnail Images.
But It can be overridden using `thumbnailImageDirectory` method.

**Note :** [Image Intervention](https://github.com/Intervention/image) Package is required to generate Thumbnail Images by default.

However it's possible to customize the way of generating thumbnail image using method `generateThumbnailImageUsing`

```
Cropper::make('avatar')
		->enableOpen()
		->enableDownload()
		->generateThumbnailImage()
		->generateThumbnailImageUsing(function(TemporaryUploadedFile $file, string $filename, string $diskName, ?string $directory, string $visibility){
			...Your Code Here
		})->removeThumbnailImageUsing(function(TemporaryUploadedFile $file, string $filePath, string $diskName, ?string $directory, string $visibility){
			...Your Code Here
		})
```

License
-------

[](#license)

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

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance14

Infrequent updates — may be unmaintained

Popularity42

Moderate usage in the ecosystem

Community15

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 85.7% 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 ~20 days

Recently: every ~29 days

Total

7

Last Release

1120d ago

PHP version history (2 changes)1.0.0PHP ^8.0

1.0.3PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/1705ec0b2fad294ffd82d57464fd85888afaaab3c2d362a71d8addb6be1820ca?d=identicon)[Nuhel](/maintainers/Nuhel)

---

Top Contributors

[![Nuhel](https://avatars.githubusercontent.com/u/30118433?v=4)](https://github.com/Nuhel "Nuhel (18 commits)")[![harish2704](https://avatars.githubusercontent.com/u/1652903?v=4)](https://github.com/harish2704 "harish2704 (1 commits)")[![NathanaelGT](https://avatars.githubusercontent.com/u/32760797?v=4)](https://github.com/NathanaelGT "NathanaelGT (1 commits)")[![ncavare](https://avatars.githubusercontent.com/u/9728577?v=4)](https://github.com/ncavare "ncavare (1 commits)")

### Embed Badge

![Health badge](/badges/nuhel-filament-cropper/health.svg)

```
[![Health](https://phpackages.com/badges/nuhel-filament-cropper/health.svg)](https://phpackages.com/packages/nuhel-filament-cropper)
```

###  Alternatives

[guava/calendar

Adds support for vkurko/calendar to Filament PHP.

298241.0k3](/packages/guava-calendar)[pxlrbt/filament-environment-indicator

Indicator for the current environment inside Filament

151923.9k12](/packages/pxlrbt-filament-environment-indicator)[pboivin/filament-peek

Full-screen page preview modal for Filament

253319.6k12](/packages/pboivin-filament-peek)[bezhansalleh/filament-google-analytics

Google Analytics integration for FilamentPHP

205144.8k5](/packages/bezhansalleh-filament-google-analytics)[dotswan/filament-map-picker

Easily pick and retrieve geo-coordinates using a map-based interface in your Filament applications.

124139.3k2](/packages/dotswan-filament-map-picker)[stephenjude/filament-feature-flags

Filament implementation of feature flags and segmentation with Laravel Pennant.

118126.9k](/packages/stephenjude-filament-feature-flags)

PHPackages © 2026

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