PHPackages                             one-strive/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. [Image &amp; Media](/categories/media)
4. /
5. one-strive/nova-image-cropper

ActiveLibrary[Image &amp; Media](/categories/media)

one-strive/nova-image-cropper
=============================

An advanced image field for Nova with crop and resize. Security-focused fork addressing critical JS dependency vulnerabilities.

5.2(1mo ago)0784↑16.7%[2 PRs](https://github.com/OneStrive/nova-image-cropper/pulls)MITVuePHP ^8.0CI passing

Since Jan 5Pushed 1mo agoCompare

[ Source](https://github.com/OneStrive/nova-image-cropper)[ Packagist](https://packagist.org/packages/one-strive/nova-image-cropper)[ RSS](/packages/one-strive-nova-image-cropper/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (4)Versions (20)Used By (0)

Nova5 Image Cropper Field (formerly Nova advanced image field)
==============================================================

[](#nova5-image-cropper-field-formerly-nova-advanced-image-field)

> **Security Update Notice**: This package is a security-focused fork of [ultrasimplified/nova5-image-cropper](https://github.com/UltraSimplified/nova5-image-cropper). It addresses critical security vulnerabilities in JavaScript dependencies, specifically removing the vulnerable `vue-template-compiler` package and updating the build configuration for Vue 3 compatibility. Full credit goes to the original authors listed below.

This package provides an advanced image field for Nova 5 resources allowing you to upload, crop and resize any image. It uses [Cropper.js](https://fengyuanchen.github.io/cropperjs) with [vue-cropperjs](https://github.com/Agontuk/vue-cropperjs) in the frontend and [Intervention Image](http://image.intervention.io) in the backend.

This version has been updated to use the current v3 build of Intervention/Image and has increased compatibility with Laravel Nova version 5.

What's Different in This Fork
-----------------------------

[](#whats-different-in-this-fork)

This security-focused fork includes the following updates:

- **Removed vulnerable dependencies**: Eliminated `vue-template-compiler` (XSS vulnerability CVE-2024-9506)
- **Zero vulnerabilities**: All npm security audits pass with 0 vulnerabilities

[![screenshot of the advanced image field](https://raw.githubusercontent.com/UltraSimplified/nova5-image-cropper/master/screenshot.png)](https://raw.githubusercontent.com/UltraSimplified/nova5-image-cropper/master/screenshot.png)

Requirements
------------

[](#requirements)

This package requires **one of** the following libraries:

- GD Library &gt;=2.0 (used by default)
- Imagick PHP extension &gt;=6.5.7

See [Intervention requirements](http://image.intervention.io/getting_started/installation) for more details.

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

[](#installation)

Install the package into a Laravel application with Nova using Composer:

```
composer require one-strive/nova-image-cropper
```

If you want to use Imagick as the default image processing library, follow the [Intervention documentation for Laravel](http://image.intervention.io/getting_started/installation#laravel).

TL;DR: run the following command in the root folder of your site.

```
php artisan vendor:publish --provider="Intervention\Image\Laravel\ServiceProvider"

```

This will provide you with a new configuration file (config/image.php) where you can specify your preferred driver.

Usage
-----

[](#usage)

`ImageCropper` extends from `File` so you can use any methods that `File` implements. See the documentation [here](https://nova.laravel.com/docs/2.0/resources/fields.html#file-field).

```
