PHPackages                             innobotics/imageresize - 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. innobotics/imageresize

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

innobotics/imageresize
======================

PHP class to resize images

1.4.5(5y ago)1111MITPHPPHP &gt;=5.3.0

Since Oct 25Pushed 5y ago1 watchersCompare

[ Source](https://github.com/innobotics/ImageResize)[ Packagist](https://packagist.org/packages/innobotics/imageresize)[ Docs](https://github.com/innobotics/imageresize)[ RSS](/packages/innobotics-imageresize/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (10)DependenciesVersions (14)Used By (0)

Image resize
============

[](#image-resize)

Install
-------

[](#install)

You can install ImageResize by composer. Add this row to your composer.json.

```
{
    "require": {
        "Innobotics/ImageResize": "1.*"
    }
}
```

But do you want to include this pack use this:

```
require_once '/path/to/Innobotics/ImageResize.php';
```

Usage
-----

[](#usage)

You should create an image object.

```
$image = new \Innobotics\ImageResize();
```

Add types. The type contains the key, and the image's size.

```
$image->setType('large', 640, 480);
$image->setType('medium', 320, 240);
$image->setType('thumbnail', 160, 120);
$image->setType('content', 500, null); // You can add 'null' as height. It won't be cropped.
```

Add the source file.

```
$image->setSource('/home/notesz/teszt/bianka_160117.jpg');
```

Add the target folder.

```
$image->setTarget('/home/notesz/teszt/resized');
```

If you don't like the original name, you can add a new filename. (It is optional)

```
$image->setFileName('bianka.jpg'); //optional
```

Would you like to set compression? Add this one: (It is optional, the default value is 75)

```
$image->setCompression(100); //optional
```

Would you like to set compression type? Add this one: (It is optional, the default value is 9) You can find types here:

```
$image->setCompressionType(8); //optional
```

Would you like to use a file prefix? Add this one: (It is optional)

```
$image->setPrefix('image'); //optional
```

Would you like to disable progressive (setInterlace)? Add this one: (It is optional)

```
$image->setProgressive(false); //optional
```

Would you like to use retina sizes? Add this one: (It is optional)

```
$image->setRetina(true); //optional
```

If you don't want to save the original image you can disable it. Add this one: (It is optional)

```
$image->setSaveOriginal(false); //optional
```

Resize your image.

```
if ($image->resize() === true) {
    print 'It\s okay! :)';
} else {
    print 'Something happened!';
}
```

Then you can reach the result.

```
print_r($image->getResult());
```

If the resize was success, the result is:

```
Array
(
    [status] => success
    [message] => Array
        (
            [files] => Array
                (
                    [large] => image_bianka_large.jpg
                    [medium] => image_bianka_medium.jpg
                    [thumbnail] => image_bianka_thumbnail.jpg
                    [original] => image_bianka.jpg
                )

        )

)
```

But the resize was false, the result is:

```
Array
(
    [status] => error
    [message] => unable to open image `/home/notesz/teszt/IMG_790s7.jpg': No such file or directory @ error/blob.c/OpenBlob/2638
)
```

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity65

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

Recently: every ~201 days

Total

13

Last Release

2161d ago

### Community

Maintainers

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

---

Top Contributors

[![notesz](https://avatars.githubusercontent.com/u/6445554?v=4)](https://github.com/notesz "notesz (11 commits)")

---

Tags

phpimageresizeretina

### Embed Badge

![Health badge](/badges/innobotics-imageresize/health.svg)

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

###  Alternatives

[gumlet/php-image-resize

PHP class to re-size and scale images

1.2k5.7M54](/packages/gumlet-php-image-resize)[stefangabos/zebra_image

A single-file, lightweight PHP library designed for efficient image manipulation featuring methods for modifying images and applying filters

141110.4k6](/packages/stefangabos-zebra-image)

PHPackages © 2026

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