PHPackages                             scalexy/filament-spatie-media-library-croppie - 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. scalexy/filament-spatie-media-library-croppie

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

scalexy/filament-spatie-media-library-croppie
=============================================

A filament form field for image upload using spatie media library and croppie.js

v0.1.5(2y ago)014MITBladePHP ^8.0

Since Jul 15Pushed 2y agoCompare

[ Source](https://github.com/ScaleXY/filament-spatie-media-library-croppie)[ Packagist](https://packagist.org/packages/scalexy/filament-spatie-media-library-croppie)[ RSS](/packages/scalexy-filament-spatie-media-library-croppie/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (2)Versions (8)Used By (0)

Filament Spatie Media Library Croppie Plugin
============================================

[](#filament-spatie-media-library-croppie-plugin)

[![Latest Version on Packagist](https://camo.githubusercontent.com/4a48a987ce3e646587bb8f02e77b49044232209b2c958afe266e1fc2467fcf5d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7363616c6578792f66696c616d656e742d7370617469652d6d656469612d6c6962726172792d63726f707069652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/scalexy/filament-spatie-media-library-croppie)[![Total Downloads](https://camo.githubusercontent.com/5aa7eb5f9b94f20cc2a5491c8c703bf171188dee2ab7d0ef69c3c971f2e3aeb5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7363616c6578792f66696c616d656e742d7370617469652d6d656469612d6c6962726172792d63726f707069652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/scalexy/filament-spatie-media-library-croppie)

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

[](#installation)

You can install the package via composer (no need to install croppie as well as its assets are bundled):

```
composer require scalexy/filament-spatie-media-library-croppie
```

To use outside filament (e.g. with just the forms package), add the js and css to your vite (or mix) config:

```
@vite([
    'vendor/scalexy/filament-spatie-media-library-croppie/resources/dist/js/filament-spatie-media-library-croppie.js',
    'vendor/scalexy/filament-spatie-media-library-croppie/resources/dist/css/filament-spatie-media-library-croppie.css',
    ...
])
```

This field extends and therefore has all the functionality of the [Filament Spatie Media Library Plugin](https://filamentphp.com/docs/2.x/spatie-laravel-media-library-plugin/installation) field.

```
SpatieMediaLibraryCroppie::make('image')
    ->boundaryWidth('100%')
    ->boundaryHeight('600'),
```

Use `boundaryWidth` and `boundaryHeight` to set width and height of the image area in the modal. The values above are the defaults.

```
SpatieMediaLibraryCroppie::make('image')
    ->viewportWidth('400')
    ->viewportHeight('400'),
```

Use `viewportWidth` and `viewportHeight` to set width and height of the cropper itself. Values above are the defaults.

```
SpatieMediaLibraryCroppie::make('image')
    ->showZoomer(),
```

`showZoomer` can be called to show the zoom bar below the image in the modal.

```
SpatieMediaLibraryCroppie::make('avatar')
    ->avatar(),
```

We can make croppie circular using `avater` method.

```
Croppie::make('background')
    ->modalSize('6xl')
    ->modalHeading("Crop Background Image")
```

Modal size can be customized using `modalSize` method. For setting the heading use `modalHeading`.

### Set image quality and format

[](#set-image-quality-and-format)

If your cropped images are very large (see: \[[Foliotek/Croppie#444](https://github.com/Foliotek/Croppie/issues/444)\]), you can use the `imageFormat()` and `imageQuality()` methods to modify the resulting image.

```
SpatieMediaLibraryCroppie::make('image')
    ->imageFormat('jpeg')
    ->imageQuality(0.7);
```

Defaults are:

- `imageQuality(0.9)`
- `imageFormat('png')`

License
-------

[](#license)

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

Acknowldgements
---------------

[](#acknowldgements)

This is a fork of [josefbehr/FilamentCroppie](https://github.com/josefbehr/FilamentCroppie), which in turn is a fork of of [nuhel/FilamentCroppie](https://github.com/nuhel/FilamentCroppie) that extended and adapted to use spatie/media-library and install croppie via npm.

Changelog
---------

[](#changelog)

v0.0.1

- fork `josefbehr/filament-croppie` and rename everything

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~4 days

Total

7

Last Release

1005d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6816da33fbd1d68f0263dde5153601800bc756eb5f2030b5596cdf1c23c69b1b?d=identicon)[ScaleXY](/maintainers/ScaleXY)

---

Top Contributors

[![Nuhel](https://avatars.githubusercontent.com/u/30118433?v=4)](https://github.com/Nuhel "Nuhel (17 commits)")[![Athuli7](https://avatars.githubusercontent.com/u/4718029?v=4)](https://github.com/Athuli7 "Athuli7 (11 commits)")[![josefbehr](https://avatars.githubusercontent.com/u/4368880?v=4)](https://github.com/josefbehr "josefbehr (10 commits)")

---

Tags

laravelfile-uploadfilamentcroppiespatie-media-library

### Embed Badge

![Health badge](/badges/scalexy-filament-spatie-media-library-croppie/health.svg)

```
[![Health](https://phpackages.com/badges/scalexy-filament-spatie-media-library-croppie/health.svg)](https://phpackages.com/packages/scalexy-filament-spatie-media-library-croppie)
```

###  Alternatives

[josefbehr/filament-spatie-media-library-croppie

A filament form field for image upload using spatie media library and croppie.js

126.6k](/packages/josefbehr-filament-spatie-media-library-croppie)[mwguerra/filemanager

A full-featured file manager package for Laravel and Filament v5 with dual operating modes, drag-and-drop uploads, S3/MinIO support, and comprehensive security features.

718.5k1](/packages/mwguerra-filemanager)[kingofcode/laravel-uploadable

Laravel Uploadable trait to automatically upload images and files with minimum configuration

286.4k](/packages/kingofcode-laravel-uploadable)[3x1io/filament-browser

File &amp; Folders &amp; Media Browser With Code Editor

491.3k](/packages/3x1io-filament-browser)[fojuth/plupload

A Laravel 4 implementation of Plupload (http://www.plupload.com/).

162.5k](/packages/fojuth-plupload)

PHPackages © 2026

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