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

ActiveLibrary

ivliev/imagefly
===============

Imagefly for Laravel 6.x, 7.x, 8.x

2.0.2(5y ago)11.2k↓100%1[1 issues](https://github.com/ivliev/imagefly/issues)MITPHPPHP &gt;=7.2.5

Since Jan 13Pushed 5y ago2 watchersCompare

[ Source](https://github.com/ivliev/imagefly)[ Packagist](https://packagist.org/packages/ivliev/imagefly)[ RSS](/packages/ivliev-imagefly/feed)WikiDiscussions 6.x Synced today

READMEChangelog (8)Dependencies (2)Versions (11)Used By (0)

Imagefly for Laravel 6 / 7
==========================

[](#imagefly-for-laravel-6--7)

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.

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

[](#compatibility)

Imagefly currently works with Laravel 6.x and 7.x

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

[](#installation)

Install using composer:

```
composer require ivliev/imagefly
```

Add the service provider in `app/config/app.php`:

```
Ivliev\Imagefly\ImageflyServiceProvider::class,
```

And add the Imagefly alias to `app/config/app.php`:

```
'Imagefly' => Ivliev\Imagefly\Facades\Imagefly::class,
```

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

[](#configuration)

The default config file is located in `vendor/ivliev/imagefly/src/config/imagefly.php`
You should copy this file to `/config/imagefly.php` or using artisan:

```
php artisan vendor:publish
```

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!

**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'
)

```

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 automatically proportionally until either the width or height is max. 100 pixels**
``

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

###  Health Score

26

—

LowBetter than 46% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity64

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

Recently: every ~343 days

Total

10

Last Release

2021d ago

Major Versions

v1.0.8 → 2.0.12020-09-04

2.0.2 → 6.x-dev2020-09-09

PHP version history (3 changes)1.0PHP &gt;=5.4.0

v1.0.2PHP &gt;=5.5.9

2.0.1PHP &gt;=7.2.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/39706b7ec5d3076e9837b9c25ef8dc3a847f6698a04f7bbcc4c47210e32e86c0?d=identicon)[ivliev](/maintainers/ivliev)

---

Top Contributors

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

### Embed Badge

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

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

###  Alternatives

[spatie/laravel-mix-preload

Add preload and prefetch links based your Mix manifest

169175.3k2](/packages/spatie-laravel-mix-preload)[consoletvs/support

ConsoleTVs support library

27300.1k8](/packages/consoletvs-support)[pqb/filemanager-laravel

Filemanager for Laravel

9019.6k1](/packages/pqb-filemanager-laravel)[devfactory/imagecache

Laravel package for generating thumbnails of images and caching them in your public files folder.

1620.1k](/packages/devfactory-imagecache)

PHPackages © 2026

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