PHPackages                             izupet/laravel-flyimages - 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. izupet/laravel-flyimages

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

izupet/laravel-flyimages
========================

Optimize images on the fly for laravel

1.0.0(10y ago)223MITPHPPHP &gt;=5.5.0

Since Nov 23Pushed 10y ago2 watchersCompare

[ Source](https://github.com/izupet/laravel-flyimages)[ Packagist](https://packagist.org/packages/izupet/laravel-flyimages)[ RSS](/packages/izupet-laravel-flyimages/feed)WikiDiscussions master Synced 4w ago

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

laravel-flyimages
=================

[](#laravel-flyimages)

Resize/crop image on the fly according to screen resolution (bootstrap grid pattern).

Prerequisite
------------

[](#prerequisite)

Imagick (ImageMagick) PHP extension
PHP version &gt;= 5.5
Laravel framework 4 and up

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

[](#installation)

First you need to add this line to composer.json file:

```
{
  "require": {
       "izupet/laravel-flyimages" : "^1.0.0"
    }
}
```

Update composer from the terminal:

```
$ composer update
```

Add service provider in app.php file:

```
Izupet\FlyImages\FlyImagesServiceProvider::class
```

After composer finishes its work, run this artisan command to generate config file

```
$ php artisan vendor:publish
```

Put this line of JavaScript to the &lt;head&gt; tag of your template.

```
document.cookie='resolution='+Math.max(screen.width)+'; path=/';
```

You are done.

Usage
-----

[](#usage)

Customize route in flyimages.php config file. This route will be used as a path to the images in your templates.

Now for every image you want to optimize you should append query string to the path. Possible parameters are:

```
lg-w lg-h md-w md-h sm-w sm-h xs-w xs-m

```

Valid values for this parameters are:

- number (integer) of pixels
- text (string) auto - calculate this dimension automatically according to opposite one (the ratio is kept)

If screen resolution is equal or higher than 1200px the lg prefixed parameters are used.

If screen resolution is equal or higher than 992px and smaller than 1200px the md prefixed parameters are used. If there are none, closest parent's one (lg) are used.

The same pattern of hierarchy is used also for sm and xs prefixed parameters.

A prerequisite for everything to work is that both width and height must be present for certain prefixed parameter. If there are not both present, original image will be delivered.

\####Examples

```

 Wont work

```

\##Caching

Browser caching is available through ETAg header. Server side caching is not used. It is recommended to use reverse proxy cache server or CDN for very visited websites.

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity58

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

3872d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6051165?v=4)[Igor Zupet](/maintainers/izupet)[@izupet](https://github.com/izupet)

---

Top Contributors

[![izupet](https://avatars.githubusercontent.com/u/6051165?v=4)](https://github.com/izupet "izupet (17 commits)")

---

Tags

laravelimagesbootstrapdynamicallyfly

### Embed Badge

![Health badge](/badges/izupet-laravel-flyimages/health.svg)

```
[![Health](https://phpackages.com/badges/izupet-laravel-flyimages/health.svg)](https://phpackages.com/packages/izupet-laravel-flyimages)
```

###  Alternatives

[intervention/image-laravel

Laravel Integration of Intervention Image

1558.1M161](/packages/intervention-image-laravel)[ralphjsmit/laravel-glide

Auto-magically generate responsive images from static image files.

4923.6k5](/packages/ralphjsmit-laravel-glide)

PHPackages © 2026

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