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

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

kwaadpepper/image-resizer
=========================

Resize images on the fly and cache them

4.0.0(1mo ago)56.6k↑361.5%[2 issues](https://github.com/Kwaadpepper/image-resizer/issues)MITPHPPHP ^8.3CI passing

Since Mar 24Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/Kwaadpepper/image-resizer)[ Packagist](https://packagist.org/packages/kwaadpepper/image-resizer)[ Docs](https://github.com/kwaadpepper/image-resizer)[ RSS](/packages/kwaadpepper-image-resizer/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (12)Versions (25)Used By (0)

Image Resizer
=============

[](#image-resizer)

[![Latest Version on Packagist](https://camo.githubusercontent.com/2cbae76ae7d0c893619aabb01a6b50c4d6b040972b2490d1748957d8c65a9b69/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b776161647065707065722f696d6167652d726573697a65723f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kwaadpepper/image-resizer)[![Total Downloads](https://camo.githubusercontent.com/fd3a88cb7a77c33d4c3879052fac980ee3302a6ed2e80ce95993d7ef62ad016d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b776161647065707065722f696d6167652d726573697a65723f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kwaadpepper/image-resizer)[![CI](https://camo.githubusercontent.com/73a0b5113172114884ea4ba618e0fb26356abe18c58a50f64e7328311a74714e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f4b776161647065707065722f696d6167652d726573697a65722f63692e796d6c3f6272616e63683d6d6173746572267374796c653d666c61742d737175617265266c6162656c3d4349)](https://github.com/Kwaadpepper/image-resizer/actions/workflows/ci.yml)

Resizes an image on the fly and returns the new link

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

[](#installation)

Via Composer

```
composer require kwaadpepper/image-resizer
```

Usage
-----

[](#usage)

1 - Publish config

```
php artisan vendor:publish --provider="Kwaadpepper\ImageResizer\ImageResizerServiceProvider"
```

2 - Set a config in templates array (config/image-resizer.php)

```
/**
 *   resize => will resize the image (boolean)
 *   fit => Combine cropping and resizing to format image in a smart way (boolean)
 *   keepRatio => will keep image ratio wile resizing (boolean)
 *   trim => boolean to trim the image using border color
 *   inCanvas => to make sure image boundarie is respected
 *   format => select tha wantd ouput form, yan can just convert images if you want
 */
'templates' => [
    'smallWebp' => [
        'height' => 500,
        'width' => 250,
        'inCanvas' => true,
        'format' => 'webp',
        'trim' => ['transparent', null, 10]
    ]
]

```

3 - type in console `php artisan storage:link`

4 - in your blade template override an image link

```

```

5 - Optional You can manually clean outdated cache files using command `php artisan image-resizer:clean-cache`or force cleaning the cache using `php artisan cache:clear`

- **Please note that this is automatically scheduled on production every half hour**
- Cache lifetime defaults to 1 week (configurable via `lifetime` in `config/image-resizer.php`). Cached images are regenerated on demand.

Change log
----------

[](#change-log)

Please see the [changelog](changelog.md) for more information on what has changed recently.

Testing
-------

[](#testing)

```
composer test
```

Contributing
------------

[](#contributing)

Please see [contributing.md](contributing.md) for details and a todolist.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Jérémy Munsch](https://github.com/kwaadpepper)
- [All Contributors](../../contributors)

License
-------

[](#license)

MIT. Please see the [license file](license.md) for more information.

###  Health Score

53

—

FairBetter than 97% of packages

Maintenance82

Actively maintained with recent releases

Popularity29

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity77

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

Recently: every ~161 days

Total

23

Last Release

51d ago

Major Versions

0.1.3 → 2.0.02023-05-23

2.1.0 → 3.0.02024-05-05

2.1.1 → 3.1.02025-03-02

3.1.1 → 4.0.02026-03-28

PHP version history (2 changes)3.0.0PHP ^8.2

4.0.0PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/7d6fe69e010efceae2bd9a92eb6463139fff339c94c545b6b7b1210a00d963e4?d=identicon)[Kwaadpepper](/maintainers/Kwaadpepper)

---

Top Contributors

[![Kwaadpepper](https://avatars.githubusercontent.com/u/6019313?v=4)](https://github.com/Kwaadpepper "Kwaadpepper (30 commits)")

---

Tags

laravelresizeimages

###  Code Quality

Static AnalysisPHPStan

### Embed Badge

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

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

###  Alternatives

[intervention/image-laravel

Laravel Integration of Intervention Image

1536.5M102](/packages/intervention-image-laravel)[bkwld/croppa

Image thumbnail creation through specially formatted URLs for Laravel

510496.0k23](/packages/bkwld-croppa)[ayvazyan10/nova-imagic

Imagic is a Laravel Nova field package that allows for image manipulation capabilities, such as cropping, resizing, quality adjustment, and WebP conversion. It utilizes the powerful Intervention Image class for image manipulation.

144.3k1](/packages/ayvazyan10-nova-imagic)[reliqarts/laravel-guided-image

Simplified and ready image manipulation for Laravel via intervention image.

351.4k](/packages/reliqarts-laravel-guided-image)

PHPackages © 2026

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