PHPackages                             astrotomic/laravel-imgix - 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. astrotomic/laravel-imgix

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

astrotomic/laravel-imgix
========================

Laravel bindings and facade to generate imgix URLs and support for multiple sources.

1.3.0(9mo ago)826.7k↓13.6%4MITPHPPHP ^7.4 || ^8.0 || ^8.1 || ^8.2 || ^8.3CI passing

Since Feb 27Pushed 9mo ago2 watchersCompare

[ Source](https://github.com/Astrotomic/laravel-imgix)[ Packagist](https://packagist.org/packages/astrotomic/laravel-imgix)[ Docs](https://github.com/astrotomic/laravel-imgix)[ Fund](https://forest.astrotomic.info)[ GitHub Sponsors](https://github.com/Gummibeer)[ RSS](/packages/astrotomic-laravel-imgix/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (7)Dependencies (7)Versions (8)Used By (0)

Laravel Imgix
=============

[](#laravel-imgix)

[![Latest Version](https://camo.githubusercontent.com/572559e643a2ec4b2f887e093e5b235d2d4e2a13c72fcea46a221a62c4c04fee/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f617374726f746f6d69632f6c61726176656c2d696d6769782e7376673f6c6162656c3d52656c65617365267374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/astrotomic/laravel-imgix)[![MIT License](https://camo.githubusercontent.com/488875035691f7f5ffcdfa6fd936a482a6aa6b5f502cc00846142206071b37ee/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f417374726f746f6d69632f6c61726176656c2d696d6769782e7376673f6c6162656c3d4c6963656e736526636f6c6f723d626c7565267374796c653d666f722d7468652d6261646765)](https://github.com/Astrotomic/laravel-imgix/blob/master/LICENSE)[![Offset Earth](https://camo.githubusercontent.com/d204555ebe1fb0ae82d10c97b4f4ffc2dfdd2ba1489f98be7f7e8708333a0466/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f54726565776172652d2546302539462538432542332d677265656e3f7374796c653d666f722d7468652d6261646765)](https://plant.treeware.earth/Astrotomic/laravel-imgix)[![Larabelles](https://camo.githubusercontent.com/a2c8d5126ddd8c5ddc627176d1d2e0568f8399b50038e71fd7f774c3e24dbe4b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726162656c6c65732d2546302539462541362538342d6c6967687470696e6b3f7374796c653d666f722d7468652d6261646765)](https://www.larabelles.com/)

[![GitHub Workflow Status](https://camo.githubusercontent.com/246d90edda097979ffa8506d5d859dc4202f125d6300a17a2616271c6ae01840/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f417374726f746f6d69632f6c61726176656c2d696d6769782f72756e2d74657374733f7374796c653d666c61742d737175617265266c6f676f436f6c6f723d7768697465266c6f676f3d676974687562266c6162656c3d5465737473)](https://github.com/Astrotomic/laravel-imgix/actions?query=workflow%3Arun-tests)[![StyleCI](https://camo.githubusercontent.com/e00dcd9b2fef73b307f39545e60911ac15e68eeb2f1f977c722f73bec55cc359/68747470733a2f2f7374796c6563692e696f2f7265706f732f3331333734333031302f736869656c64)](https://styleci.io/repos/313743010)[![Total Downloads](https://camo.githubusercontent.com/a687c413a53e6eec384096de3dcebe062d965941478ad3cd7edd438546761892/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f617374726f746f6d69632f6c61726176656c2d696d6769782e7376673f6c6162656c3d446f776e6c6f616473267374796c653d666c61742d737175617265)](https://packagist.org/packages/astrotomic/laravel-imgix)

Laravel bindings and facade to generate [imgix](https://imgix.com) URLs and support for multiple sources.

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

[](#installation)

You can install the package via composer:

```
composer require astrotomic/laravel-imgix
```

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

[](#configuration)

First you have to publish the packages configuration file via artisan command.

```
php artisan vendor:publish --provider="Astrotomic\Imgix\ImgixServiceProvider" --tag="config"
```

After this you will have a `config/imgix.php` file. The `default` key which contains the name of your source you want to use by default. The `sources` key contains an array of your sources keyed by the name/identifier.

Each source must have a `domain`. The other keys are optional and you can even omit them.

```
return [
    'default' => 'default',

    'sources' => [
        'default' => [
            'domain' => 'example.imgix.net', // domain only - without http(s)
            // 'useHttps' => true, // default is true - you shouldn't change this
            // 'signKey' => null, // your signing key for this domain
            // 'includeLibraryParam' => true, // if you want to remove the `ixlib` param
        ],
        'astrotomic' => [
            'domain' => 'img.astrotomic.info',
            'useHttps' => true,
            'signKey' => 'mySecretSignKey',
            'includeLibraryParam' => false,
        ],
    ],
];
```

Usage
-----

[](#usage)

The package provides a facade and global function you can use to get the pre-configured `\Imgix\UrlBuilder`.

```
use Astrotomic\Imgix\Facades\Imgix;

Imgix::createURL('my/cool/image.jpg');
// https://example.imgix.net/my/cool/image.jpg?ixlib=php-3.3.0

Imgix::source('astrotomic')->createURL('logo.png');
// https://img.astrotomic.info/logo.png?s=200c1c2065023265285dcbc4eff99955
```

If you don't want to import the facade, you can use the global function which is an alias to the `Imgix::source()` method.

```
imgix()->createURL('my/cool/image.jpg');
// https://example.imgix.net/my/cool/image.jpg?ixlib=php-3.3.0

imgix('astrotomic')->createURL('logo.png');
// https://img.astrotomic.info/logo.png?s=200c1c2065023265285dcbc4eff99955
```

### Blade component

[](#blade-component)

There is a Blade component `x-imgix` included in this package:

```

```

**Optional parameters:**

- `source`: use one of the source defined in your `imgix.php` config
- `width`: define the output width - will be added to the params
- `height`: define the output height - will be added to the params
- `params`: define the array of params passed to the [Imgix API](https://docs.imgix.com/apis/rendering)

You can publish the view by running

```
php artisan vendor:publish --provider="Astrotomic\Imgix\ImgixServiceProvider" --tag="views"
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](https://github.com/Astrotomic/.github/blob/master/CONTRIBUTING.md) for details. You could also be interested in [CODE OF CONDUCT](https://github.com/Astrotomic/.github/blob/master/CODE_OF_CONDUCT.md).

### Security

[](#security)

If you discover any security related issues, please check [SECURITY](https://github.com/Astrotomic/.github/blob/master/SECURITY.md) for steps to report it.

Credits
-------

[](#credits)

- [Tom Witkowski](https://github.com/Gummibeer)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

Treeware
--------

[](#treeware)

You're free to use this package, but if it makes it to your production environment I would highly appreciate you buying the world a tree.

It’s now common knowledge that one of the best tools to tackle the climate crisis and keep our temperatures from rising above 1.5C is to [plant trees](https://www.bbc.co.uk/news/science-environment-48870920). If you contribute to my forest you’ll be creating employment for local families and restoring wildlife habitats.

You can buy trees at [offset.earth/treeware](https://plant.treeware.earth/Astrotomic/laravel-imgix)

Read more about Treeware at [treeware.earth](https://treeware.earth)

###  Health Score

48

—

FairBetter than 95% of packages

Maintenance57

Moderate activity, may be stable

Popularity34

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

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

###  Release Activity

Cadence

Every ~271 days

Recently: every ~404 days

Total

7

Last Release

280d ago

Major Versions

0.2.0 → 1.0.02022-04-12

PHP version history (4 changes)0.1.0PHP ^7.4 || ^8.0

0.1.1PHP ^7.3 || ^8.0

1.1.0PHP ^7.4 || ^8.0 || ^8.1 || ^8.2

1.2.0PHP ^7.4 || ^8.0 || ^8.1 || ^8.2 || ^8.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6187884?v=4)[Tom Herrmann](/maintainers/Gummibeer)[@Gummibeer](https://github.com/Gummibeer)

---

Top Contributors

[![Gummibeer](https://avatars.githubusercontent.com/u/6187884?v=4)](https://github.com/Gummibeer "Gummibeer (47 commits)")[![jeversen](https://avatars.githubusercontent.com/u/957260?v=4)](https://github.com/jeversen "jeversen (16 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (2 commits)")

---

Tags

cdnimageimagesimgixlaravellaravelimageimagescdnimgixastrotomiclaravel-imgix

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/astrotomic-laravel-imgix/health.svg)

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

###  Alternatives

[intervention/image-laravel

Laravel Integration of Intervention Image

1496.5M102](/packages/intervention-image-laravel)[bkwld/croppa

Image thumbnail creation through specially formatted URLs for Laravel

510496.0k23](/packages/bkwld-croppa)[otisz/laravel-imgix

1419.4k](/packages/otisz-laravel-imgix)[ralphjsmit/laravel-glide

Auto-magically generate responsive images from static image files.

4719.6k5](/packages/ralphjsmit-laravel-glide)[spatie/laravel-og-image

Generate OG images for your Laravel app

305.2k](/packages/spatie-laravel-og-image)[danihidayatx/image-optimizer

Optimize your Filament images before they reach your database. Forked from joshembling/image-optimizer for Filament v4 &amp; v5 support.

254.4k](/packages/danihidayatx-image-optimizer)

PHPackages © 2026

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