PHPackages                             salted-herring/salted-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. salted-herring/salted-cropper

AbandonedArchivedSilverstripe-module

salted-herring/salted-cropper
=============================

Salted Herring's Image Cropper Field

2.0.8(7y ago)21.8k↓100%5[3 issues](https://github.com/salted-herring/salted-cropper/issues)[1 PRs](https://github.com/salted-herring/salted-cropper/pulls)MITJavaScript

Since Oct 18Pushed 7y ago1 watchersCompare

[ Source](https://github.com/salted-herring/salted-cropper)[ Packagist](https://packagist.org/packages/salted-herring/salted-cropper)[ Docs](https://github.com/salted-herring/salted-library)[ RSS](/packages/salted-herring-salted-cropper/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)DependenciesVersions (15)Used By (0)

Salted Cropper
==============

[](#salted-cropper)

Salted Herring's Cropper Field for SilverStripe. This is to avoid the deadly issue that FileSync task will disconnect all cropped images, when using silverstripe-cropperfield. Please remove silverstripe-cropperfield module if you have already installed it, other it will result in funny conflict.

2.0.0
-----

[](#200)

Because in 1.x versions, cropping happens directly on the images, which makes them not available for "reuse", 2.0.0 is now to resolve this issue by redesigning the way that the cropper tool works.

Pleaes note: SaltedUploader will be retired soon. Please replace all SaltedUploader occurrences with CroppableImageField!!

### Usage

[](#usage)

1. Download it to SilverStripe's root directory

```
git clone git@github.com:salted-herring/salted-cropper.git
```

or

```
composer require salted-herring/salted-cropper
```

2. Sake it

```
sake dev/build
```

3. flush frontend and backend's cache
4. Sample code:

    ```
    protected static $has_one = array(
        'Photo'     =>  'SaltedCroppableImage'
    );

    public function getCMSFields()
    {
        $fields = parent::getCMSFields();
        ...
        // adding a free cropper
        $fields->addFieldToTab(TAB_NAME, CroppableImageField::create('PhotoID', A_TITLE_TO_THE_FILED);

        // adding cropper with ratio
        $fields->addFieldToTab(TAB_NAME, CroppableImageField::create('PhotoID', A_TITLE_TO_THE_FILED)->setCropperRatio(16/9));
        ...
        return $fields;
    }
    ```
5. Add image &gt; upload/select &gt; save &gt; edit &gt; do your cropping
6. Output

    ```
    $Photo
    $Photo.Cropped
    $Photo.Cropped.SetWidth(100)
    ```

1.x
---

[](#1x)

This doc is for 1.0 and above. If you are using 1.0- versions, do not use this doc.

### Usage (internal usage for now)

[](#usage-internal-usage-for-now)

1. Download it to SilverStripe's root directory

```
git clone git@github.com:salted-herring/salted-cropper.git
```

or

```
composer require salted-herring/salted-cropper
```

2. Sake it

```
sake dev/build
```

3. flush frontend and backend's cache
4. Sample code:

    ```
    protected static $has_one = array(
        'Photo'     =>  'Image'
    );

    public function getCMSFields() {
        $fields = parent::getCMSFields();
        ...
        // adding a free cropper
        $fields->addFieldToTab(TAB_NAME, SaltedUploader::create('Photo', A_TITLE_TO_THE_FILED);

        // adding cropper with ratio
        $fields->addFieldToTab(TAB_NAME, SaltedUploader::create('Photo', A_TITLE_TO_THE_FILED)->setCropperRatio(16/9));
        ...
        return $fields;
    }
    ```
5. Upload and image, and then click the edit button - in the drop down area, you will see the cropper area. Do the cropping and then save the image (NOTE: if you don't save the image editing, before you save the page/data object, it will not take effect)
6. Output

    ```
    $Photo
    $Photo.Cropped
    $Photo.Cropped.SetWidth(100)
    ```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity71

Established project with proven stability

 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

Every ~56 days

Recently: every ~35 days

Total

12

Last Release

2875d ago

Major Versions

0.0.3 → 1.0.22016-10-27

1.0.4 → 2.0.02018-01-28

### Community

Maintainers

![](https://www.gravatar.com/avatar/0395e460ef8e7579fc3f6e426d16bd0fed2b54de4ef5611d49494b0d6ee240be?d=identicon)[leochenftw](/maintainers/leochenftw)

![](https://www.gravatar.com/avatar/540bb83cb25750c18552987570b71946aebb4a1b3d6fe1c11e60ddcccda4fe17?d=identicon)[saltedherring](/maintainers/saltedherring)

---

Top Contributors

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

---

Tags

cropper-fieldsilverstripesilverstripe-cropperfieldphplibrary

### Embed Badge

![Health badge](/badges/salted-herring-salted-cropper/health.svg)

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

###  Alternatives

[quizlet/hammock

Hammock is a stand-alone mocking library for Hacklang.

27445.5k](/packages/quizlet-hammock)[bupy7/xml-constructor

The array-like constructor of XML document structure.

1337.9k](/packages/bupy7-xml-constructor)

PHPackages © 2026

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