PHPackages                             elcuro/image2 - 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. elcuro/image2

ActiveCroogo-plugin[Image &amp; Media](/categories/media)

elcuro/image2
=============

1.4(12y ago)414121PHP

Since Feb 26Pushed 12y ago3 watchersCompare

[ Source](https://github.com/elcuro/image2)[ Packagist](https://packagist.org/packages/elcuro/image2)[ RSS](/packages/elcuro-image2/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (1)Versions (2)Used By (1)

\#Croogo Image2 plugin for Croogo 1.4+

This helper is modification of original Image helper boundled with Croogo. This version support method chaining and watermark image

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

[](#requirements)

- gdlib2

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

[](#installation)

- download and copy this plugin to app/Plugin/Image2
- activate plugin in administration Extesions -&gt; Plugins
- create folder for resized images, default is app/webroot/uploads/resized. You can change it in plugin bootstrap.php
- folder must have write permission

Example usage
-------------

[](#example-usage)

### Resize

[](#resize)

Classic "hard" resize

```
   $this->Image2->source('img/screenshot.png')
          ->resizeit(50, 50, false)
          ->imagePath();  // return /uploads/resized/0_0_50_50_resize_screenshot.png

```

Ratio resize

```
   $this->Image2->source('img/screenshot.png')
          ->resizeit(50, 50, true)
          ->imagePath();  // return /uploads/resized/0_0_50_38_resize_screenshot.png

```

### Crop

[](#crop)

Crop direct from original image

```
   $this->Image2->source('img/screenshot.png')
          ->crop(200, 100, false)
          ->imagePath(); // return /uploads/resized/150_200_200_200_crop_screenshot.png

```

Resize image to longer side and then crop

```
   $this->Image2->source('img/screenshot.png')
          ->crop(200, 100)
          ->imagePath(); // return /uploads/resized/0_38_200_200_crop_screenshot.png

```

### Watermark

[](#watermark)

Watermark image in PNG format, support for alpha channel.

```
   $this-Image2->watermark($watermark_image, $position, $watermark_absolute_path)

```

- $watermark\_image = path to watermark image
- $position = position of watermark
- $watermark\_absolute\_path = true if $watermark\_image is absolute path

    ```
    $this->Image2->source('img/screenshot.png', 'center')
           ->resizeit(500, 500, false)
           ->watermark('img/croogo.png', 'center', false)
           ->imagePath() // return /uploads/resized/croogo_png_center_0_0_500_500_resize_screenshot.png

    ```

Positions:

- center - center of the image, long size 70% of original image long side
- overlay - watermark image is resized to equal sizes as original
- pattern - watermark is croped to equal sizes as original, assume big pattern watermark
- left bottom - not implemented yet
- right bottom - not implemented yet
- left top - not implemented yet
- right top - not implemented yet

### Inline image

[](#inline-image)

Base64 encoded inline image

```
   $this->Image2->source('img/screenshot.png')
          ->crop(200, 100, false)
          ->inlineImage();  // return 'data:image/png;base64,i3fs.....'

```

Backward compatibility
----------------------

[](#backward-compatibility)

"resize" method from previous version is supported

```
   $this->Image2->resize($path, $width, $height, $method = 'resizeRatio', $htmlAttributes = array(), $return = false, $server_path = false);

```

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity63

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

Unknown

Total

1

Last Release

4507d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0325b289c373d03cc450df9e662c86cf8975872864e6fd48ab469199003a2bc3?d=identicon)[elcuro](/maintainers/elcuro)

---

Top Contributors

[![elcuro](https://avatars.githubusercontent.com/u/69106?v=4)](https://github.com/elcuro "elcuro (28 commits)")

### Embed Badge

![Health badge](/badges/elcuro-image2/health.svg)

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

###  Alternatives

[helsingborg-stad/municipio

A bootstrap theme for creating municipality sites.

4028.3k10](/packages/helsingborg-stad-municipio)[october/rain

October Rain Library

1601.7M73](/packages/october-rain)[mindkomm/timmy

Advanced image manipulation for Timber.

17737.1k](/packages/mindkomm-timmy)[bueltge/multisite-global-media

Multisite Global Media is a WordPress plugin which shares media across the Multisite network.

23131.8k](/packages/bueltge-multisite-global-media)[mediawiki/maps

Adds various mapping features to MediaWiki

84152.3k3](/packages/mediawiki-maps)[wp-media/imagify-plugin

Image optimization plugin for WordPress by WP Media.

8065.3k](/packages/wp-media-imagify-plugin)

PHPackages © 2026

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