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

ActiveLibrary

noonic/image
============

Image upload, cropping and resizing.

114324PHP

Since Dec 23Pushed 9y ago2 watchersCompare

[ Source](https://github.com/noonic/laravel-base-image)[ Packagist](https://packagist.org/packages/noonic/image)[ RSS](/packages/noonic-image/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Image Uploader and Cropper
==================================

[](#laravel-image-uploader-and-cropper)

- Upload images
- Crop image
- Creates thumbnails with various configurable sizes
- Aspect ratio option
- Uses Iframe to upload file

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

[](#installation)

**1. Add the package to your application**

**`/composer.json`**

```
{
    "require": {
        "noonic/image": "dev-master"
    }
}

```

**2. Add Provider and Facade**

**`/config/app.php`**

```
'providers' => [
    ...
    Noonic\Image\ImageServiceProvider::class,
];

'aliases' => [
    ...
    'Image'     => Noonic\Image\ImageHelperFacade::class,
];

```

**3 Publish package files:**

```
php artisan vendor:publish

```

**4. Make output directory writable:**

```
chmod 777 -R /public/images/uploads/

```

**5. Include JavaScript Helper file**

**`/resources/views/app.blade.php`**

```

```

Usage
-----

[](#usage)

**Create input for uploading new image**

```
{!! Form::open() !!}
  @include('noonic_image::_input', [
      'name' => 'photo',
      'folder' => 'photos',
      'data' => '',
      'required' => true
  ])
{!! Form::close() !!}
```

**Access uploaded image**

```

```

You can pass `t` (thumbnail), `s` (small), `m` (medium) or `l` (large) as second parameter to obtain required size.

Options
-------

[](#options)

- **name**: \[required\] \[String\] Name of file input
- **ratio**: \[optional\] \[String\] \[4/3, 16:9, 1/1\] Image ratio to crop and resize. Default: 4/3.
- **folder**: \[optional\] \[String\] Name of folder where the image will be uploaded. Default: 'default' folder
- **data**: \[optional\] \[String\] Pass image path to prefill data
- **required**: \[optional\] \[Boolean\] \[true / false\] To make the image required, prompts JavaScript Alert box.

Sizes
-----

[](#sizes)

```
'sizes' => [
    '16:9' => [
        't' => [192, 108],
        's' => [400, 225],
        'm' => [800, 450],
        'l' => [1024, 576]
    ],

    '4:3' => [
        't' => [200, 150],
        's' => [400, 300],
        'm' => [800, 600],
        'l' => [1024, 768]
    ],

    '1:1' => [
        't' => [200, 200],
        's' => [400, 400],
        'm' => [800, 800],
        'l' => [1024, 1024]
    ]
]
```

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

[](#requirements)

- PHP GD library
- Jquery
- Twitter Bootstrap

Screenshots
-----------

[](#screenshots)

### 1. Form

[](#1-form)

[![Screenshot 1](https://camo.githubusercontent.com/ff33042c69b24bf4f11bae5ff727feb03c2b47880b814684980813d84509096d/687474703a2f2f6e6f6f6e69636c61622e636f6d2f6c61726176656c2d626173652f776562736974652f7075626c69632f696d616765732f73637265656e73686f74732f696d6167652f75706c6f616465722d312e706e67 "Screenshot 1")](https://camo.githubusercontent.com/ff33042c69b24bf4f11bae5ff727feb03c2b47880b814684980813d84509096d/687474703a2f2f6e6f6f6e69636c61622e636f6d2f6c61726176656c2d626173652f776562736974652f7075626c69632f696d616765732f73637265656e73686f74732f696d6167652f75706c6f616465722d312e706e67)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

[](#)

### 2. Iframe image uploader

[](#2-iframe-image-uploader)

[![Screenshot 2](https://camo.githubusercontent.com/751a175d82900053d52b36b545c5d422c90b20343e8af2f3ac39d51f02cd211f/687474703a2f2f6e6f6f6e69636c61622e636f6d2f6c61726176656c2d626173652f776562736974652f7075626c69632f696d616765732f73637265656e73686f74732f696d6167652f75706c6f616465722d322e706e67 "Screenshot 2")](https://camo.githubusercontent.com/751a175d82900053d52b36b545c5d422c90b20343e8af2f3ac39d51f02cd211f/687474703a2f2f6e6f6f6e69636c61622e636f6d2f6c61726176656c2d626173652f776562736974652f7075626c69632f696d616765732f73637265656e73686f74732f696d6167652f75706c6f616465722d322e706e67)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

[](#-1)

### 3. After uploading image cropping area selection

[](#3-after-uploading-image-cropping-area-selection)

[![Screenshot 3](https://camo.githubusercontent.com/c0657b1b7121989e1564bba6f01ac1849f857752e29dfc6e821beccd2bdc961f/687474703a2f2f6e6f6f6e69636c61622e636f6d2f6c61726176656c2d626173652f776562736974652f7075626c69632f696d616765732f73637265656e73686f74732f696d6167652f75706c6f616465722d332e706e67 "Screenshot 3")](https://camo.githubusercontent.com/c0657b1b7121989e1564bba6f01ac1849f857752e29dfc6e821beccd2bdc961f/687474703a2f2f6e6f6f6e69636c61622e636f6d2f6c61726176656c2d626173652f776562736974652f7075626c69632f696d616765732f73637265656e73686f74732f696d6167652f75706c6f616465722d332e706e67)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

[](#-2)

### 4. Crop success and show cropped image inside iframe

[](#4-crop-success-and-show-cropped-image-inside-iframe)

[![Screenshot 4](https://camo.githubusercontent.com/77a9b856d5e220a97d8defd042097388c4a687ee13a25ac969dabc8c6dde24b2/687474703a2f2f6e6f6f6e69636c61622e636f6d2f6c61726176656c2d626173652f776562736974652f7075626c69632f696d616765732f73637265656e73686f74732f696d6167652f75706c6f616465722d342e706e67 "Screenshot 4")](https://camo.githubusercontent.com/77a9b856d5e220a97d8defd042097388c4a687ee13a25ac969dabc8c6dde24b2/687474703a2f2f6e6f6f6e69636c61622e636f6d2f6c61726176656c2d626173652f776562736974652f7075626c69632f696d616765732f73637265656e73686f74732f696d6167652f75706c6f616465722d342e706e67)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

[](#-3)

### 5. Form with uploaded and cropped image preview

[](#5-form-with-uploaded-and-cropped-image-preview)

[![Screenshot 5](https://camo.githubusercontent.com/4414629fc29fe0a51b51123b24bb797748859356b4c00ffb4d7a5205d46d87a7/687474703a2f2f6e6f6f6e69636c61622e636f6d2f6c61726176656c2d626173652f776562736974652f7075626c69632f696d616765732f73637265656e73686f74732f696d6167652f75706c6f616465722d352e706e67 "Screenshot 5")](https://camo.githubusercontent.com/4414629fc29fe0a51b51123b24bb797748859356b4c00ffb4d7a5205d46d87a7/687474703a2f2f6e6f6f6e69636c61622e636f6d2f6c61726176656c2d626173652f776562736974652f7075626c69632f696d616765732f73637265656e73686f74732f696d6167652f75706c6f616465722d352e706e67)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

[](#-4)

Authors
-------

[](#authors)

Atul Yadav - [GitHub](https://github.com/atulmy) • [Twitter](https://twitter.com/atulmy)

License
-------

[](#license)

Copyright (c) 2015 Noonic Lab

The MIT License ()

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 69% 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

---

Top Contributors

[![atulmy](https://avatars.githubusercontent.com/u/685786?v=4)](https://github.com/atulmy "atulmy (20 commits)")[![noonic](https://avatars.githubusercontent.com/u/13583140?v=4)](https://github.com/noonic "noonic (9 commits)")

### Embed Badge

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

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

PHPackages © 2026

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