PHPackages                             square1/resized-laravel - 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. square1/resized-laravel

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

square1/resized-laravel
=======================

Laravel package for resized.co, the on-demand image manipulation service.

3.0.1(3w ago)292.0k—2.1%2MITPHPPHP ^8.2CI passing

Since Mar 9Pushed 3w ago8 watchersCompare

[ Source](https://github.com/square1-io/resized-php-laravel)[ Packagist](https://packagist.org/packages/square1/resized-laravel)[ Docs](https://github.com/square1-io/resized-php-laravel)[ RSS](/packages/square1-resized-laravel/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (8)Dependencies (8)Versions (13)Used By (0)

Resized
=======

[](#resized)

[![Latest Version on Packagist](https://camo.githubusercontent.com/a75831561f9ffeaf64d2886cb046a450f3ae8b647d41a65746ce19b25230b4c1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f737175617265312f726573697a65642d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/square1/resized-laravel)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/ca603c42d78991848c942d650f129b5874580abb015fe752b395ca91cc9aa319/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f737175617265312f726573697a65642d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/square1/resized-laravel)

This is the Laravel package for resized.co, an on-demand image resize manipulation service.

Requires PHP 8.2 and Laravel 10 or higher.

Install
-------

[](#install)

Via Composer

```
$ composer require square1/resized-laravel
```

The package supports auto-discovery. The service provider and facade are registered automatically.

To manually register the service provider in your `config/app.php`:

Find the `providers` key in your `config/app.php` and register the Resized Service Provider.

```
    'providers' => array(
        // ...
        Square1\Laravel\Resized\ResizedServiceProvider::class,
    )
```

Find the `aliases` key in your `config/app.php` and add the Resized facade alias.

```
    'aliases' => array(
        // ...
        'Resized' => Square1\Laravel\Resized\ResizedFacade::class,
    )
```

Configuration
-------------

[](#configuration)

By default, the package uses the following environment variables to auto-configure the plugin without modification:

```
RESIZED_KEY
RESIZED_SECRET
RESIZED_DEFAULT_IMAGE

```

You can also publish the config file to set default processing options applied to every `process()` call:

```
'options' => [
    'quality' => 90,
],
```

When `RESIZED_KEY` or `RESIZED_SECRET` are not set, the service falls back to a local pass-through mode that returns URLs unchanged, so your application does not crash in environments without credentials configured.

On a `local` environment (detected via the `environment` config key), the package always uses pass-through mode regardless of credentials, returning relative and absolute URLs unchanged.

Usage
-----

[](#usage)

Set the default failover image.

```
Resized::setDefaultImage('http://www.example.com/no-image.jpg');
```

Generate a 300x500 resized image URL.

```
$url = Resized::process('http://www.example.com/some-image-to-resize.jpg', '300', '500');
```

Generate an image URL constrained to 300 width whilst maintaining aspect ratio.

```
$url = Resized::process('http://www.example.com/some-image-to-resize.jpg', '300');
```

Generate an image URL constrained to 500 height whilst maintaining aspect ratio.

```
$url = Resized::process('http://www.example.com/some-image-to-resize.jpg', '', '500');
```

Override the image slug used in the generated URL.

```
$url = Resized::process('http://www.example.com/some-image-to-resize.jpg', '300', '500', 'A nice image name');
```

Specify the compression level through the options array. Quality ranges from 0 (poor quality, small file) to 100 (best quality, large file). Only applies to JPG encoding. Default: 90.

```
$url = Resized::process('http://www.example.com/some-image-to-resize.jpg', '', '500', 'A nice image name', ['quality' => 100]);
```

Limit the maximum character length of the filename slug appended to the generated URL.

```
Resized::setMaxSlugLength(50);
$url = Resized::process('http://www.example.com/some-very-long-image-filename.jpg', '300', '500');
```

Relative URLs and non-HTTP URLs are returned unchanged without making a request to the resized.co service.

```
$url = Resized::process('/uploads/image.jpg', '300', '500');
// Returns '/uploads/image.jpg' unmodified
```

Testing
-------

[](#testing)

```
$ composer test
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

62

—

FairBetter than 99% of packages

Maintenance95

Actively maintained with recent releases

Popularity35

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity83

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~570 days

Total

10

Last Release

25d ago

Major Versions

v1.1 → v2.02020-03-12

v2.2 → 3.0.02026-06-05

PHP version history (5 changes)v1.0PHP ~5.5|~7.0

v1.1PHP ~7.1|~7.2

v2.0PHP ~7.2|~7.4

v2.2PHP ~7.4|~8.0

3.0.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/5a6096b0455d662c5963ed82e1f0968bc4a18bdfedd332f7fd2598480b4c17bd?d=identicon)[conroyp](/maintainers/conroyp)

![](https://www.gravatar.com/avatar/87a3c780c8712d13c47574f6ffc320e9a6c2d368d1b51d4ad53dc5440ab3406d?d=identicon)[ciaranmaher](/maintainers/ciaranmaher)

---

Top Contributors

[![ciaranmaher](https://avatars.githubusercontent.com/u/122523?v=4)](https://github.com/ciaranmaher "ciaranmaher (17 commits)")[![conroyp](https://avatars.githubusercontent.com/u/143244?v=4)](https://github.com/conroyp "conroyp (10 commits)")[![jeffochoa](https://avatars.githubusercontent.com/u/8247079?v=4)](https://github.com/jeffochoa "jeffochoa (6 commits)")[![JoseVte](https://avatars.githubusercontent.com/u/3540836?v=4)](https://github.com/JoseVte "JoseVte (4 commits)")[![gelhorng](https://avatars.githubusercontent.com/u/225365566?v=4)](https://github.com/gelhorng "gelhorng (2 commits)")[![GastonGelhorn](https://avatars.githubusercontent.com/u/13986195?v=4)](https://github.com/GastonGelhorn "GastonGelhorn (1 commits)")

---

Tags

laravelimage manipulationsquare1resized

###  Code Quality

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/square1-resized-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/square1-resized-laravel/health.svg)](https://phpackages.com/packages/square1-resized-laravel)
```

###  Alternatives

[orchestra/imagine

Imagine (Wrapper) Component for Laravel

70220.6k3](/packages/orchestra-imagine)[ace-of-aces/laravel-image-transform-url

Easy, URL-based image transformations inspired by Cloudflare Images.

17610.6k](/packages/ace-of-aces-laravel-image-transform-url)[classic-o/nova-media-library

Tool and field that will let you managing files and add them to the posts

154180.4k](/packages/classic-o-nova-media-library)[tomatophp/filament-media-manager

Manage your media files using spatie media library with easy to use GUI for FilamentPHP

14852.3k3](/packages/tomatophp-filament-media-manager)[nikkanetiya/laravel-color-palette

Laravel Wrapper for `ksubileau/color-thief-php`. Grabs the dominant color or a representative color palette from an image. Uses PHP and GD or Imagick.

3312.7k](/packages/nikkanetiya-laravel-color-palette)

PHPackages © 2026

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