PHPackages                             zepekegno/resize-image - 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. zepekegno/resize-image

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

zepekegno/resize-image
======================

Resize an image and convert into another format. driver use is GD

1.0(3y ago)0101MITPHPPHP  &gt;=8.0

Since Dec 11Pushed 3y ago1 watchersCompare

[ Source](https://github.com/zepekegno224/resize-image)[ Packagist](https://packagist.org/packages/zepekegno/resize-image)[ RSS](/packages/zepekegno-resize-image/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

Resize an Image
===============

[](#resize-an-image)

[![example branch parameter](https://github.com/zepekegno224/resize-image/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/zepekegno224/resize-image/actions/workflows/ci.yml/badge.svg?branch=master)[![Coverage Status](https://camo.githubusercontent.com/eb08db66bde680f3f5d841ec349a52d42871b0de3b0a2ad4d3e5a3fa8320ea99/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f7a6570656b65676e6f3232342f726573697a652d696d6167652f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/zepekegno224/resize-image?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/ae81a79832b9ae748f1b0c8219027b51afb99e549e94b803b1c7e61514ac8ce3/687474703a2f2f706f7365722e707567782e6f72672f7a6570656b65676e6f2f726573697a652d696d6167652f76)](https://packagist.org/packages/zepekegno/resize-image) [![Total Downloads](https://camo.githubusercontent.com/540dbc9a3e649d7ac8dc165a88bd3a5f3f3fb486089cccec4d2a1cdbe0341581/687474703a2f2f706f7365722e707567782e6f72672f7a6570656b65676e6f2f726573697a652d696d6167652f646f776e6c6f616473)](https://packagist.org/packages/zepekegno/resize-image) [![Latest Unstable Version](https://camo.githubusercontent.com/dfb16f08aa7bec3ad88813a8ee8efea753aa6402b36ea4a6c88f0e087e2be79a/687474703a2f2f706f7365722e707567782e6f72672f7a6570656b65676e6f2f726573697a652d696d6167652f762f756e737461626c65)](https://packagist.org/packages/zepekegno/resize-image) [![License](https://camo.githubusercontent.com/4950b4ceb8eeb3ebecde32b9374b2df1de1b9f55757e99709548d86d914aa247/687474703a2f2f706f7365722e707567782e6f72672f7a6570656b65676e6f2f726573697a652d696d6167652f6c6963656e7365)](https://packagist.org/packages/zepekegno/resize-image) [![PHP Version Require](https://camo.githubusercontent.com/8b78ce33a3f4b0a2a43bfa5d540e2dfe020fac5150d491d2b2bd41fd7f912b94/687474703a2f2f706f7365722e707567782e6f72672f7a6570656b65676e6f2f726573697a652d696d6167652f726571756972652f706870)](https://packagist.org/packages/zepekegno/resize-image)

This Library will help you to convert easily and image into other format. this library use GD driver. PHP version supported \*8 What we can do with this library ?

- We can convert an image into another format.
- We can resize an image to another format.
- We can convert and resize an image to another format simultaneously.

Format supported for resizing : PNG, JPEG, JPG, GIF Format supported for conversion : PNG, JPEG, JPG

```
//Resize an image

// Example with png
$source = 'image.png';

$resizeImage = new zepekegno\Resize($source,50,50);

/**
 * If file exist a copy of this file will be created with suffix cpr
*/
$resizeImage->make(target:'tmp/final',quality:9);

//if delete is true will delete this file and create a new file
$resizeImage->make(target:'tmp/final',quality:9,delete:true);

// Example with Gif

$source = 'image.gif';

$resizeImage = new zepekegno\Resize($source,50,50);

/**
 * If file exist a copy of this file will be created with suffix cpr
*/
$resizeImage->make('tmp/final');

//if delete is true will delete this file and create a new file
$resizeImage->make(target:'tmp/final',delete:true);

//Convert an image to other format
/**
 * convert image png to jpeg
 * Return the path of image
*/
$source = 'image.png';
$convertImage = new zepekegno\Resize(source:$source,height:50,width:50);
$convertImage->convert(type:'jpeg',target:'tmp/final',quality:100,isResizable:false);

/**
 * Convert png to jpeg and resize it
 * if we want to resize, past isResizable to true
 * Return the path of image
*/
$source = 'image.png';
$convertImage = new zepekegno\Resize(source:$source,height:50,width:50);
$img = $convertImage->convert(type:'jpeg',target:'tmp/final',quality:100,isResizable:true);

// Generate image
$image = "";
```

ResizeImage are constructed with this parameters

- $source **string**, the filename
- $width **int**, the new width of the file
- $height **int**, the new height of the file

The make method which needs the following parameters

- $target **string**, the directory where the file will be store
- $quality **int**, the quality of the image will be use for png \[0-9\], jpeg or png \[0-100\], gif are not need
- $delete \**bool*, Optional, true delete the file if exist else it will be copied into a new file prepend with \**cpr*

The convert method which needs the following parameters

- $type **string**, the format would be convert the image
- $target **string**, the directory where the file will be store
- $quality **int**, the quality of the image will be use for png \[0-9\], jpeg or png \[0-100\], gif are not need
- $isResizable **bool**, Optional, true convert and resize the image, false convert only the image

The support conversion for Gif is'nt available

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

1246d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9a502394a6431a335e290b6f39ac90b09b44a46df5cd95ac3591e6bc09130b7b?d=identicon)[zepekegno224](/maintainers/zepekegno224)

---

Top Contributors

[![zepekegno224](https://avatars.githubusercontent.com/u/59239718?v=4)](https://github.com/zepekegno224 "zepekegno224 (67 commits)")

---

Tags

image-processingjpegpng

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/zepekegno-resize-image/health.svg)

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

###  Alternatives

[milon/barcode

Barcode generator like Qr Code, PDF417, C39, C39+, C39E, C39E+, C93, S25, S25+, I25, I25+, C128, C128A, C128B, C128C, 2-Digits UPC-Based Extention, 5-Digits UPC-Based Extention, EAN 8, EAN 13, UPC-A, UPC-E, MSI (Variation of Plessey code)

1.5k13.3M39](/packages/milon-barcode)[bkwld/croppa

Image thumbnail creation through specially formatted URLs for Laravel

510496.0k23](/packages/bkwld-croppa)[goat1000/svggraph

Generates SVG graphs

132849.6k3](/packages/goat1000-svggraph)[cohensive/embed

Media Embed (for Laravel or as a standalone).

120370.4k](/packages/cohensive-embed)[netresearch/rte-ckeditor-image

Image support in CKEditor for the TYPO3 ecosystem - by Netresearch

63991.3k4](/packages/netresearch-rte-ckeditor-image)[humanmade/tachyon-plugin

Rewrites WordPress image URLs to use Tachyon

87338.5k2](/packages/humanmade-tachyon-plugin)

PHPackages © 2026

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