PHPackages                             optimal/file-managing - 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. optimal/file-managing

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

optimal/file-managing
=====================

Simple package for file manipulation.

1.3.0(2w ago)01.5k11MITPHPPHP ^8.2

Since Sep 10Pushed 2mo agoCompare

[ Source](https://github.com/optimal-program/file-managing)[ Packagist](https://packagist.org/packages/optimal/file-managing)[ RSS](/packages/optimal-file-managing/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (10)Dependencies (3)Versions (19)Used By (1)

file-managing
=============

[](#file-managing)

Simple package for file manipulation.

Image output settings
---------------------

[](#image-output-settings)

Uploaded images can be resized into maximum dimensions, saved in another format and with required compression quality. Every setting is optional - `null` maximum dimension is not limited, `null` extension keeps the format the image was uploaded in and `null` quality means the default quality of the used image library.

```
use Optimal\FileManaging\FileUploader;
use Optimal\FileManaging\Utils\ImageOutputSettings;

$uploader = FileUploader::getInstance();

// resize into 512x512 px, save as webp with quality 85
$uploader->setImageOutputSettings(new ImageOutputSettings(512, 512, 'webp', 85));

// the same written by separate setters
$uploader->setMaxImageWidth(512);
$uploader->setMaxImageHeight(512);
$uploader->setImageOutputFormat('webp', 85);
```

Images are only downscaled - a smaller image is never enlarged and its aspect ratio is always kept, so the resulting image fits into the maximum dimensions. Default maximum dimensions of the uploader are `FileUploader::DEFAULT_MAX_IMAGE_WIDTH` x `FileUploader::DEFAULT_MAX_IMAGE_HEIGHT`.

The same settings can be applied on any already existing image:

```
use Optimal\FileManaging\ImagesManager;
use Optimal\FileManaging\Utils\ImageOutputSettings;

$imagesManager = new ImagesManager();
$imagesManager->setSourceDirectory('images/source');

$image = $imagesManager->loadImageManageResource('photo', 'png');
$image->applyOutputSettings(new ImageOutputSettings(1920, 1080, 'webp', 80), 'images/target');

// resource of the resulting image - with new extension, resolution and file size
$outputImage = $image->getOutputImageResource();
```

Tests
-----

[](#tests)

```
composer install
php test/index.php

```

###  Health Score

54

—

FairBetter than 97% of packages

Maintenance89

Actively maintained with recent releases

Popularity18

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity80

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 85.4% 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 ~157 days

Recently: every ~44 days

Total

17

Last Release

20d ago

Major Versions

0.0.2 → 1.0.02021-05-04

PHP version history (4 changes)0.0.1PHP &gt;=7.2

1.1.4.1PHP &gt;=7.4

1.2.0PHP &gt;=8.4

1.2.4PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/eb84f0aa74d1fd05f7d90f828e54a068ef2aa27e2057af285bef43d916485b8a?d=identicon)[jindra@optimal-program.cz](/maintainers/jindra@optimal-program.cz)

![](https://www.gravatar.com/avatar/a0b96715965aa3bb261c4a0a58145cdf1141d4fd32d538da5c56d039cd3d3c66?d=identicon)[vidlak01](/maintainers/vidlak01)

---

Top Contributors

[![vidlak01](https://avatars.githubusercontent.com/u/22590874?v=4)](https://github.com/vidlak01 "vidlak01 (35 commits)")[![JindraJan](https://avatars.githubusercontent.com/u/36569081?v=4)](https://github.com/JindraJan "JindraJan (4 commits)")[![Miu-a](https://avatars.githubusercontent.com/u/74982446?v=4)](https://github.com/Miu-a "Miu-a (2 commits)")

---

Tags

imageresize

### Embed Badge

![Health badge](/badges/optimal-file-managing/health.svg)

```
[![Health](https://phpackages.com/badges/optimal-file-managing/health.svg)](https://phpackages.com/packages/optimal-file-managing)
```

###  Alternatives

[intervention/image

PHP Image Processing

14.4k214.2M2.8k](/packages/intervention-image)[gumlet/php-image-resize

PHP class to re-size and scale images

1.2k6.1M72](/packages/gumlet-php-image-resize)[sybio/image-workshop

Powerful PHP class using GD library to work easily with images including layer notion (like Photoshop or GIMP)

876953.8k12](/packages/sybio-image-workshop)[masterexploder/phpthumb

A library for manipulating images in PHP.

966774.9k17](/packages/masterexploder-phpthumb)[intervention/image-laravel

Laravel Integration of Intervention Image

1589.8M226](/packages/intervention-image-laravel)[bkwld/croppa

Image thumbnail creation through specially formatted URLs for Laravel

506520.9k31](/packages/bkwld-croppa)

PHPackages © 2026

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