PHPackages                             php-collective/file-storage-image-processor - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. php-collective/file-storage-image-processor

ActiveLibrary[File &amp; Storage](/categories/file-storage)

php-collective/file-storage-image-processor
===========================================

File Storage Image Processor

1.0.0(6mo ago)08.2k↑1268.8%1[1 issues](https://github.com/php-collective/file-storage-image-processor/issues)2MITPHPPHP &gt;=8.1CI passing

Since Dec 27Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/php-collective/file-storage-image-processor)[ Packagist](https://packagist.org/packages/php-collective/file-storage-image-processor)[ RSS](/packages/php-collective-file-storage-image-processor/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (6)Versions (3)Used By (2)

File Storage Image Processing
=============================

[](#file-storage-image-processing)

[![CI](https://github.com/php-collective/file-storage-image-processor/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/php-collective/file-storage-image-processor/actions/workflows/ci.yml)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)

Image Processing for the [File Storage Library](https://github.com/php-collective/file-storage).

Built on top of [Intervention Image v3](https://image.intervention.io/v3).

Features
--------

[](#features)

- Manipulates images and produces variants of the original image and stores them
- Supports multiple image operations: resize, scale, crop, rotate, flip, sharpen, and more
- Optimizes image file size using [spatie/image-optimizer](https://github.com/spatie/image-optimizer)
- Works with League Flysystem for flexible storage backends
- Fluent API for chaining image operations

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

[](#requirements)

- PHP 8.1 or higher
- GD or Imagick extension
- Intervention Image v3

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

[](#installation)

```
composer require php-collective/file-storage-image-processor
```

Quick Example
-------------

[](#quick-example)

```
use PhpCollective\Infrastructure\Storage\Processor\Image\ImageVariantCollection;

$collection = ImageVariantCollection::create();

// Create a thumbnail with aspect ratio preserved
$collection->addNew('thumbnail')
    ->scale(300, 300)
    ->optimize();

// Create a specific-sized avatar
$collection->addNew('avatar')
    ->cover(150, 150)
    ->optimize();

$file = $file->withVariants($collection->toArray());
$file = $imageProcessor->process($file);
```

Documentation
-------------

[](#documentation)

Please start by reading the documentation in the [docs/](/docs/readme.md) directory:

- [Installation &amp; Setup](/docs/Installation-and-Setup.md)
- [Processing Images](/docs/Processing-Images.md)
- [Available Operations](/docs/Available-Operations.md) - Complete reference of all image operations

Upgrade from v2
---------------

[](#upgrade-from-v2)

This package uses **Intervention Image v3**, which has breaking changes from v2:

- `ImageManager` now requires a Driver instance instead of array configuration
- The `resize()` method no longer has an `aspectRatio` parameter
- Use `scale()` for aspect ratio preservation (recommended for most cases)
- Use `resize()` only when you need exact dimensions (may distort image)

See the [Available Operations](/docs/Available-Operations.md) documentation for detailed examples.

###  Health Score

45

—

FairBetter than 93% of packages

Maintenance78

Regular maintenance activity

Popularity26

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 64.6% 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 ~684 days

Total

2

Last Release

189d ago

Major Versions

0.1.0 → 1.0.02025-11-10

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/39854?v=4)[Mark Scherer](/maintainers/dereuromark)[@dereuromark](https://github.com/dereuromark)

---

Top Contributors

[![dereuromark](https://avatars.githubusercontent.com/u/39854?v=4)](https://github.com/dereuromark "dereuromark (31 commits)")[![burzum](https://avatars.githubusercontent.com/u/162789?v=4)](https://github.com/burzum "burzum (15 commits)")[![floriankraemer](https://avatars.githubusercontent.com/u/4996022?v=4)](https://github.com/floriankraemer "floriankraemer (2 commits)")

---

Tags

persistenceimage processingfilesstoragemediafile systemagnosticfile storage

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/php-collective-file-storage-image-processor/health.svg)

```
[![Health](https://phpackages.com/badges/php-collective-file-storage-image-processor/health.svg)](https://phpackages.com/packages/php-collective-file-storage-image-processor)
```

###  Alternatives

[league/flysystem

File storage abstraction for PHP

13.6k639.1M2.2k](/packages/league-flysystem)[league/flysystem-aws-s3-v3

AWS S3 filesystem adapter for Flysystem.

1.6k263.6M790](/packages/league-flysystem-aws-s3-v3)[sylius/resource-bundle

Resource component for Sylius.

23410.2M173](/packages/sylius-resource-bundle)[mostafaznv/larupload

Larupload is a ORM based file uploader for laravel to upload image, video, audio and other known files.

73403.7k3](/packages/mostafaznv-larupload)[league/flysystem-async-aws-s3

AsyncAws S3 filesystem adapter for Flysystem.

2610.5M31](/packages/league-flysystem-async-aws-s3)[nimbusoft/flysystem-openstack-swift

Flysystem adapter for OpenStack Swift

44774.4k6](/packages/nimbusoft-flysystem-openstack-swift)

PHPackages © 2026

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