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

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

riseuplabs/image-cropper
========================

This is an image cropper

v2.0.0(2y ago)110MITPHP

Since Jul 31Pushed 2y ago1 watchersCompare

[ Source](https://github.com/oshit-sd/image-cropper-and-resizer)[ Packagist](https://packagist.org/packages/riseuplabs/image-cropper)[ RSS](/packages/riseuplabs-image-cropper/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

OSHITSD/ImageCrop
=================

[](#oshitsdimagecrop)

This package includes converting image compress, multiple image resizers;

License
-------

[](#license)

Released under [MIT](/LICENSE) by [@oshit-sd](https://github.com/oshit-sd).

Installation
============

[](#installation)

You can install the package in to a Laravel project that uses ImageCrop via composer:

```
composer require riseuplabs/image-cropper
```

```
// config filesystems.php
'public_path' => [
    'driver'    => 'local',
    'root'      => public_path('uploads'),
    'url'       => public_path('/'),
],
```

```
// use your driver in (.env) file
FILESYSTEM_DRIVER=public_path

// If you use storage path in FILESYSTEM_DRIVER
// run this command
php artisan storage:link
```

```
# Using namespace
use RiseUpLabs\ImageCropper\Facades\ImageCrop;

// in the controller just define resizes array if you have to resize an image in multiple pieces
class ImageCropController extends Controller
{
    // preferred size is set for uploading images
    private $resizeArr = [
        ["width" => 50, "height" => 50],
        ["width" => 100, "height" => 100],
        ["width" => 200, "height" => 200],
        ["width" => 300, "height" => 300],
        ["width" => 400, "height" => 400],
        ["width" => 500, "height" => 500],
        ["width" => 600, "height" => 600],
        ["width" => 700, "height" => 700],
    ];

    public function store(Request $request)
    {
        /**
         * @param $file
         * @param $folder_path ex: photos or album/photos
         * @param $this->resizeArr (optional)
         */
        $image_path = ImageCrop::perfect($request->file, "photos", $this->resizeArr);
        // $image_path = ImageCrop::force($request->file, "photos", $this->resizeArr);
        // $image_path = ImageCrop::crop($request->file, "photos", $this->resizeArr);
        // $image_path = ImageCrop::original($request->file, "photos");
        return $image_path;
    }
}
```

\#Upload original image
-----------------------

[](#upload-original-image)

```
/**
 * @param $file
 * @param $folder_path ex: photos or album/photos
 */
$image_path = ImageCrop::original($request->file, "photos");
echo $image_path;

# output
"photos/original/daHnhY2iZlQkpuFVnB0CfgLpooVBLLoKcu7ynKEe.jpg"
```

\#Upload original image with compress quality
---------------------------------------------

[](#upload-original-image-with-compress-quality)

```
/**
 * @param $file
 * @param $folder_path ex: photos or album/photos
 * @param $quality
 */
$image_path = ImageCrop::compress($request->file, "photos", 20);
echo $image_path;

# output
"photos/original_compress/u49le8sesELKxv9VIfWPG8BGaVt5BAVn7WEs17Kk.jpg"
```

\#Resize image with perfectly
-----------------------------

[](#resize-image-with-perfectly)

```
// Resize the image according to the width dimension
$images = ImageCrop::perfect($request->file, "photos", $this->resizeArr);
dd($images);

# output
[
    "resize_50" => "photos/perfect_50X50/1UOjVGBo1bV7VDUxgQrZVhn0h2si5VO8ROV6I7qr.jpg"
    "resize_100" => "photos/perfect_100X100/1UOjVGBo1bV7VDUxgQrZVhn0h2si5VO8ROV6I7qr.jpg"
    "resize_200" => "photos/perfect_200X200/1UOjVGBo1bV7VDUxgQrZVhn0h2si5VO8ROV6I7qr.jpg"
    "resize_300" => "photos/perfect_300X300/1UOjVGBo1bV7VDUxgQrZVhn0h2si5VO8ROV6I7qr.jpg"
    "resize_400" => "photos/perfect_400X400/1UOjVGBo1bV7VDUxgQrZVhn0h2si5VO8ROV6I7qr.jpg"
    "resize_500" => "photos/perfect_500X500/1UOjVGBo1bV7VDUxgQrZVhn0h2si5VO8ROV6I7qr.jpg"
    "resize_600" => "photos/perfect_600X600/1UOjVGBo1bV7VDUxgQrZVhn0h2si5VO8ROV6I7qr.jpg"
    "resize_700" => "photos/perfect_700X700/1UOjVGBo1bV7VDUxgQrZVhn0h2si5VO8ROV6I7qr.jpg"
]
```

\#Resize image with perfectly and original file uploaded
--------------------------------------------------------

[](#resize-image-with-perfectly-and-original-file-uploaded)

```
// Resize the image according to the width dimension
$images = ImageCrop::perfectWithOriginal($request->file, "photos", $this->resizeArr);
dd($images);

# output
[
    "original" => "photos/original/owVzb9Qg4ywXNaGKLOoMtsONH82rbWD13z9XylB6.jpg"
    "resize_50" => "photos/perfect_50X50/owVzb9Qg4ywXNaGKLOoMtsONH82rbWD13z9XylB6.jpg"
    "resize_100" => "photos/perfect_100X100/owVzb9Qg4ywXNaGKLOoMtsONH82rbWD13z9XylB6.jpg"
    "resize_200" => "photos/perfect_200X200/owVzb9Qg4ywXNaGKLOoMtsONH82rbWD13z9XylB6.jpg"
    "resize_300" => "photos/perfect_300X300/owVzb9Qg4ywXNaGKLOoMtsONH82rbWD13z9XylB6.jpg"
    "resize_400" => "photos/perfect_400X400/owVzb9Qg4ywXNaGKLOoMtsONH82rbWD13z9XylB6.jpg"
    "resize_500" => "photos/perfect_500X500/owVzb9Qg4ywXNaGKLOoMtsONH82rbWD13z9XylB6.jpg"
    "resize_600" => "photos/perfect_600X600/owVzb9Qg4ywXNaGKLOoMtsONH82rbWD13z9XylB6.jpg"
    "resize_700" => "photos/perfect_700X700/owVzb9Qg4ywXNaGKLOoMtsONH82rbWD13z9XylB6.jpg"
]
```

\#Resize image like as perfect (force / crop)
---------------------------------------------

[](#resize-image-like-as-perfect-force--crop)

```
// resize with force image
// Resize the image according to the defined height and width
$images = ImageCrop::force($request->file, "photos", $this->resizeArr);
$images = ImageCrop::forceWithOriginal($request->file, "photos", $this->resizeArr);

// resize with crop image
// Crop the image to the center point of the image
$images = ImageCrop::crop($request->file, "photos", $this->resizeArr);
$images = ImageCrop::cropWithOriginal($request->file, "photos", $this->resizeArr);
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

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

Total

2

Last Release

969d ago

Major Versions

v1.0.0 → v2.0.02023-09-21

### Community

Maintainers

![](https://www.gravatar.com/avatar/0e2feae834cdfc0fb5939637804604a744a9ab8885f9b022c163d917c9b2aa9d?d=identicon)[oshit-sd](/maintainers/oshit-sd)

---

Top Contributors

[![oshit-sd](https://avatars.githubusercontent.com/u/41891355?v=4)](https://github.com/oshit-sd "oshit-sd (1 commits)")

### Embed Badge

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

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

###  Alternatives

[milon/barcode

Barcode generator like Qr Code, PDF417, C39, C39+, C39E, C39E+, C93, S25, S25+, I25, I25+, C128, C128A, C128B, C128C, 2-Digits UPC-Based Extention, 5-Digits UPC-Based Extention, EAN 8, EAN 13, UPC-A, UPC-E, MSI (Variation of Plessey code)

1.5k13.3M39](/packages/milon-barcode)[bkwld/croppa

Image thumbnail creation through specially formatted URLs for Laravel

510496.0k23](/packages/bkwld-croppa)[goat1000/svggraph

Generates SVG graphs

132849.6k3](/packages/goat1000-svggraph)[cohensive/embed

Media Embed (for Laravel or as a standalone).

120370.4k](/packages/cohensive-embed)[netresearch/rte-ckeditor-image

Image support in CKEditor for the TYPO3 ecosystem - by Netresearch

63991.3k4](/packages/netresearch-rte-ckeditor-image)[humanmade/tachyon-plugin

Rewrites WordPress image URLs to use Tachyon

87338.5k2](/packages/humanmade-tachyon-plugin)

PHPackages © 2026

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