PHPackages                             rachel/nova-image-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. rachel/nova-image-cropper

ActiveLibrary

rachel/nova-image-cropper
=========================

A Laravel Nova field.

02Vue

Since Jan 31Pushed 5y ago1 watchersCompare

[ Source](https://github.com/rachelroll/nova-image-cropper)[ Packagist](https://packagist.org/packages/rachel/nova-image-cropper)[ RSS](/packages/rachel-nova-image-cropper/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Image Field with built-in cropper for Laravel Nova
==================================================

[](#image-field-with-built-in-cropper-for-laravel-nova)

This field extends Image Field adding a handy cropper to manipulate images. Can be configurable in the same way as a [File field in Nova](https://nova.laravel.com/docs/1.0/resources/file-fields.html).

### Demo

[](#demo)

[![Demo](https://camo.githubusercontent.com/9b16f0ae34717ca2ae17ecb259889e884983c5ea5416de381d588fedd7362d38/687474703a2f2f672e7265636f726469742e636f2f397562574462714e4e4c2e676966)](https://camo.githubusercontent.com/9b16f0ae34717ca2ae17ecb259889e884983c5ea5416de381d588fedd7362d38/687474703a2f2f672e7265636f726469742e636f2f397562574462714e4e4c2e676966)

### Install

[](#install)

Run this command into your nova project: `composer require rachel/nova-image-cropper`

### Add it to your Nova Resource:

[](#add-it-to-your-nova-resource)

```
use Rachel\NovaImageCropper\ImageCropper;

ImageCropper::make('Photo'),
```

### Update form

[](#update-form)

In order to edit the existing image saved in the model, ImageCroper uses the preview method to return a base64 encoded image. You can either use the default implementation or override it as long as you return a base64 image.

```
use Rachel\NovaImageCropper\ImageCropper;

ImageCropper::make('Photo')
        ->preview(function () {
            if (!$this->value) return null;

            $url = Storage::disk($this->disk)->url($this->value);
            $filetype = pathinfo($url)['extension'];
            return 'data:image/' . $filetype . ';base64,' . base64_encode(file_get_contents($url));
        });
```

### Options

[](#options)

#### Avatar mode

[](#avatar-mode)

You can add a rounded mask to the preview and the cropper

```
ImageCropper::make('Photo')->avatar()
```

#### Custom aspect ratio

[](#custom-aspect-ratio)

Define the fixed aspect ratio of the crop box. By default, the crop box is free ratio.

- Type: Number
- Default: NaN

```
ImageCropper::make('Photo')->aspectRatio(16/9)
```

### Localization

[](#localization)

Set your translations in the corresponding xx.json file located in `/resources/lang/vendor/nova`

```
...

  "Edit Image": "Editar Imagen",
  "Cancel Crop": "Cancelar Recorte",
  "Change Image": "Cambiar Imagen",
  "Done": "Hecho",
  "Click here or drop the file to upload": "Click aquí o arrastra el archivo para comenzar la subida"
```

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity30

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/6f9f4e3f1eb126798e2fae3ad81ea2895fbe7548fe025d25c0ea770dc6a75fc2?d=identicon)[rachelroll](/maintainers/rachelroll)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/rachel-nova-image-cropper/health.svg)

```
[![Health](https://phpackages.com/badges/rachel-nova-image-cropper/health.svg)](https://phpackages.com/packages/rachel-nova-image-cropper)
```

PHPackages © 2026

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