PHPackages                             leoruhland/cakephp-resize - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. leoruhland/cakephp-resize

ActiveCakephp-plugin[Utility &amp; Helpers](/categories/utility)

leoruhland/cakephp-resize
=========================

Resize plugin for CakePHP

21.1k4PHP

Since Feb 17Pushed 10y ago2 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Resize plugin for CakePHP
=========================

[](#resize-plugin-for-cakephp)

> Note: This is a non-stable plugin for CakePHP 3.x at this time. It is currently under development and should be considered experimental.

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

[](#installation)

You can install this plugin into your CakePHP application using [composer](http://getcomposer.org).

The recommended way to install composer packages is:

```
composer require leoruhland/cakephp-resize

```

Now load the plugin:

```
bin/cake plugin load -r Resize

```

You are all set! Now call your resized images like `domain.com/resize/200x200/img/myself.png`. The `img/myself.png` should be located into your `webroot`.

Configuration
-------------

[](#configuration)

To configure the plugin, you should add to your `app\bootstrap.php`:

### defaultSize *(Default value: \[100,100\] )*

[](#defaultsize-default-value-100100-)

Sets a defaultSize for invalid sizes.

```
Configure::write('Resize.defaultSize', [100, 100]);

```

### sizes *(Default value: \[\] )*

[](#sizes-default-value--)

Sets a array of allowed sizes to resize your images. *(Fallback to defaultSize)*

```
Configure::write('Resize.sizes', [100, 100]);

```

### maxSize *(Default value: \[1920,1920\] )*

[](#maxsize-default-value-19201920-)

Sets a maxSize to resize your images. *(Fallback to defaultSize)*

```
Configure::write('Resize.maxSize', [1920, 1920]);

```

Usage
-----

[](#usage)

To resize a picture to 500x500, access the url of your picture(relative to webroot folder) prepending by `resize/500x500/`

Example using the HtmlHelper image method:

(In this case, you must go back one folder to access the root folder and not the images folder)

```
echo $this->Html->image('../resize/250x250/img/example.jpg');
echo $this->Html->image('../resize/250x250/uploads/articles/12/sample-article.jpg');

```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83.3% 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.

### Community

Maintainers

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

---

Top Contributors

[![leoruhland](https://avatars.githubusercontent.com/u/1785552?v=4)](https://github.com/leoruhland "leoruhland (10 commits)")[![bobmulder](https://avatars.githubusercontent.com/u/5465074?v=4)](https://github.com/bobmulder "bobmulder (2 commits)")

---

Tags

cakephppicture

### Embed Badge

![Health badge](/badges/leoruhland-cakephp-resize/health.svg)

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

###  Alternatives

[v-matsuk/time-overlap-calculator

Time overlap calculator

1115.4k1](/packages/v-matsuk-time-overlap-calculator)[ymlluo/group-robot

钉钉、企业微信、飞书 自定义群组机器人。支持链式语法创建发送消息。支持文本、Markdown、图片、文件、图文、卡片等消息。

233.8k1](/packages/ymlluo-group-robot)

PHPackages © 2026

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