PHPackages                             omatech/laravel-imaginator - 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. omatech/laravel-imaginator

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

omatech/laravel-imaginator
==========================

v2.4.1(1y ago)53.6k↓50%1[2 issues](https://github.com/omatech/laravel-imaginator/issues)1MITPHP

Since Jan 23Pushed 1y ago6 watchersCompare

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

READMEChangelog (10)Dependencies (1)Versions (23)Used By (1)

Laravel: Responsive Image Creator
=================================

[](#laravel-responsive-image-creator)

Laravel Imaginator helps you to create a HTML Picture Tag, with an image in all sizes you need.

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

[](#installation)

Require the package in your composer.json.

```
composer require omatech/laravel-imaginator

```

Publish the configuration.

```
php artisan vendor:publish --provider=Omatech\Imaginator\Providers\ConfigurationServiceProvider

```

Setup configuration
-------------------

[](#setup-configuration)

Publish the configuration.

```
'scheme'     => 'https'
'server'     => 'images.domain.com'
'url_prefix' => 'uploads'

```

Configure the url of the image, you can configure the current domain, in subdomain or/with subfolder.

The example will generate

```
'source_disk' => 'local'
'cache_disk'  => 'local'

```

Choose the disk from filesystem.

```
'key'                    => ''
'glide_security_enabled' => true

```

The `key` with the `glide_security_enable` will protect the url from changes.

```
'get_image_class' => 'Omatech\Imaginator\Repositories\ImageExtractor'

```

We will need a class with the method `extract` to get the image path. You can override it with your own class, it must implements the `Omatech\Imaginator\Contracts\GetImageInterface` interface.

Using
-----

[](#using)

```
@imaginator([
    // The filename relative to filesystem.
    'id' => 'picture.png',

    // Alt of the image.
    'alt' => 'alt',

    // Class of picture element
    'class' => 'image',

    // If exists loading attribute, add loading tag and value in picture element
    'loading' => 'lazy',

    // If exists width and height attributes they will be added at the end of the fallback img tag
    'width' => '165px',
    'height' => '165px',

    // All the formats in which to generate the image.
    'formats' => ['webp','png','jpg'],

    // Glide options. http://glide.thephpleague.com/1.0/api/quick-reference/
    // Debug option will show the information of the generated image, the format and width.
    'options' => ['filt' => 'greyscale', 'debug' => true],

    // Sets of medias and sizes for your images, image size - width size.
    'sets' => [
        0 => [
            'media' => '(max-width: 600px)',
            'srcset' => [200 => 400, 300 => 600, 400 => 800, 500 => 1000]
        ],
        1 => [
            'media' => '(min-width: 600px) and (max-width: 1800px)',
            'srcset' => 200
        ]
    ]])
@endimaginator

```

All you need to do is call the component `@imaginator` from a Laravel Blade.

Example usage
-------------

[](#example-usage)

```

```

```

```

Generates this code:

```

```

Organization
------------

[](#organization)

- [Omatech](https://www.omatech.com)

Contributors
------------

[](#contributors)

See the contributors list [here](https://github.com/omatech/laravel-imaginator/graphs/contributors).

License
-------

[](#license)

[MIT license](http://opensource.org/licenses/MIT).

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance23

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~228 days

Total

22

Last Release

711d ago

Major Versions

v1.4.7 → v2.02021-09-23

### Community

Maintainers

![](https://www.gravatar.com/avatar/2a6b2440a7864015d71501a9cd77d28bed549c283afdd8d1af95f54b650dc833?d=identicon)[aponscat](/maintainers/aponscat)

---

Top Contributors

[![hondilla](https://avatars.githubusercontent.com/u/7813599?v=4)](https://github.com/hondilla "hondilla (4 commits)")[![aponscat](https://avatars.githubusercontent.com/u/20087234?v=4)](https://github.com/aponscat "aponscat (3 commits)")[![hectorarnau](https://avatars.githubusercontent.com/u/10995071?v=4)](https://github.com/hectorarnau "hectorarnau (2 commits)")[![adriaroca](https://avatars.githubusercontent.com/u/3205030?v=4)](https://github.com/adriaroca "adriaroca (1 commits)")[![AlvaroOmatech](https://avatars.githubusercontent.com/u/14976137?v=4)](https://github.com/AlvaroOmatech "AlvaroOmatech (1 commits)")[![jabello187](https://avatars.githubusercontent.com/u/125561460?v=4)](https://github.com/jabello187 "jabello187 (1 commits)")

### Embed Badge

![Health badge](/badges/omatech-laravel-imaginator/health.svg)

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

###  Alternatives

[league/glide-laravel

Glide adapter for Laravel

1433.2M35](/packages/league-glide-laravel)

PHPackages © 2026

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