PHPackages                             evgrs/kohana-imagefly - 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. evgrs/kohana-imagefly

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

evgrs/kohana-imagefly
=====================

Create resized / cropped images directly through url parameters.

v1.3.1(11y ago)016MITPHPPHP &gt;=5.3.3

Since Aug 10Pushed 10y ago1 watchersCompare

[ Source](https://github.com/evgrs/kohana-imagefly)[ Packagist](https://packagist.org/packages/evgrs/kohana-imagefly)[ Docs](https://github.com/bodom78/kohana-imagefly)[ RSS](/packages/evgrs-kohana-imagefly/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

Imagefly
========

[](#imagefly)

This module is fork of [Bodom78/kohana-imagefly](https://github.com/Bodom78/kohana-imagefly)

This module allows you to quickly create resized / cropped images directly through url parameters.
Modified images are cached after the initial request and served up thereafter to help reduce server strain.

Demo
----

[](#demo)

[Click here to see Imagefly in action.](http://www.fkportfolio.com/playground/imagefly-demo)

Compatibility
-------------

[](#compatibility)

Imagefly currently works with Kohana 3.2 and 3.3

Getting Started
---------------

[](#getting-started)

In your `application/bootstrap.php` file modify the call to Kohana::modules and include the image and imagefly modules.

```
Kohana::modules(array(
    ...
    'image'    => MODPATH.'image',
    'imagefly' => MODPATH.'imagefly',
    ...
));

```

The image module is requried for the Imagefly module to work.

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

[](#configuration)

The default config file is located in `MODPATH/imagefly/config/imagefly.php`
You should copy this file to `APPPATH/config/imagefly.php` and make changes there, in keeping with the cascading filesystem.

Configuration Options
---------------------

[](#configuration-options)

**cache\_expire:** 604800
Number of seconds before the browser checks the server for a new version of the modified image.

**cache\_dir:** 'cache/'
Path to the image cache directory you would like to use, don't forget the trailing slash!

**source\_dir:** `''`
Path prefix to the source directory you would like to use, don't forget the trailing slash!

**mimic\_source\_dir:** TRUE
Mimic the source file folder structure within the cache directory.
Useful if you want to keep track of cached files and folders to perhaps periodically clear some cache folders but not others.

**quality:** 80
The default quality of images when not specified in the URL.

**scale\_up:** FALSE
If the image should be scaled up beyond it's original dimensions on resize.

**enforce\_presets:** FALSE
Will only allow param configurations set in the `presets`
Best enabled on production sites to reduce spamming of different sized images on the server.

**presets**
Imagefly params that are allowed when `enforce_presets` is set to `TRUE`
Any other param configuration will throw a 404 error.

```
// Example presets
'presets' => array(
    'w320-h240-c',
    'w640-w480-q60'
)

```

**watermarks**
Configure one or more watermarks. Each configuration key can be passed as a param through an Imagefly URL to apply the watermark.

If no offset is specified, the center of the axis will be used.
If an offset of TRUE is specified, the bottom of the axis will be used.

```
// Example watermarks
'watermarks' => array(
    'first_watermark' => array(
        'image'    => 'path/to/first/watermark.png',
        'offset_x' => TRUE,
        'offset_y' => TRUE,
        'opacity'  => 80
    ),
    'second_watermark' => array(
        'image'    => 'path/to/second/watermark.png',
        'offset_x' => 5,
        'offset_y' => 5,
        'opacity'  => 50
    )
)

```

Usage Examples
--------------

[](#usage-examples)

Here are some examples of what you can do with Imagefly.

**Resize to exactly 100px width and height cropping from the center**
`` **OR** ``

**Resize to exactly 100px width and 150px height cropping from the center**
``

**Resize proportionally until width is 100 pixels**
``

**Resize proportionally until height is 100 pixels**
``

**Resize proportionally until either the width or height is 100 pixels, whichever comes first**
``

**Resize proportionally until height is 100 pixels with JPEG quality set to 60**
``

**Adding a watermark**
``

**Adding multiple watermarks**
``

Notes
-----

[](#notes)

- Imagefly will not process images when the width and height prams are the same as the source
- Don't forget to make your cache directory writable.
- Inspired by the [smart-lencioni-image-resizer](http://code.google.com/p/smart-lencioni-image-resizer/) by Joe Lencioni

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 78.9% 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 ~0 days

Total

2

Last Release

4289d ago

### Community

Maintainers

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

---

Top Contributors

[![Bodom78](https://avatars.githubusercontent.com/u/139152?v=4)](https://github.com/Bodom78 "Bodom78 (30 commits)")[![jlazic](https://avatars.githubusercontent.com/u/1408904?v=4)](https://github.com/jlazic "jlazic (3 commits)")[![pridemon](https://avatars.githubusercontent.com/u/1212365?v=4)](https://github.com/pridemon "pridemon (2 commits)")[![imuller](https://avatars.githubusercontent.com/u/697558?v=4)](https://github.com/imuller "imuller (1 commits)")[![rjmackay](https://avatars.githubusercontent.com/u/7965?v=4)](https://github.com/rjmackay "rjmackay (1 commits)")[![shadowhand](https://avatars.githubusercontent.com/u/38203?v=4)](https://github.com/shadowhand "shadowhand (1 commits)")

---

Tags

imagekohanaresizewatermarkcrop

### Embed Badge

![Health badge](/badges/evgrs-kohana-imagefly/health.svg)

```
[![Health](https://phpackages.com/badges/evgrs-kohana-imagefly/health.svg)](https://phpackages.com/packages/evgrs-kohana-imagefly)
```

###  Alternatives

[intervention/image

PHP Image Processing

14.3k194.3M2.2k](/packages/intervention-image)[sybio/image-workshop

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

860918.1k11](/packages/sybio-image-workshop)[bodom78/kohana-imagefly

Create resized / cropped images directly through url parameters.

5517.0k](/packages/bodom78-kohana-imagefly)[jbzoo/image

A PHP class that simplifies working with images

171126.9k3](/packages/jbzoo-image)[intervention/image-laravel

Laravel Integration of Intervention Image

1496.5M100](/packages/intervention-image-laravel)[ctessier/nova-advanced-image-field

An advanced image field for Nova with cropping and resizing.

103548.4k1](/packages/ctessier-nova-advanced-image-field)

PHPackages © 2026

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