PHPackages                             jorisnoo/statamic-imageboss - 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. jorisnoo/statamic-imageboss

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

jorisnoo/statamic-imageboss
===========================

ImageBoss integration for Statamic with Glide fallback

0.4.0(1mo ago)0397MITPHPPHP ^8.3CI passing

Since Jan 21Pushed 1mo agoCompare

[ Source](https://github.com/jorisnoo/statamic-imageboss)[ Packagist](https://packagist.org/packages/jorisnoo/statamic-imageboss)[ Docs](https://github.com/jorisnoo/statamic-imageboss)[ GitHub Sponsors]()[ RSS](/packages/jorisnoo-statamic-imageboss/feed)WikiDiscussions main Synced 2w ago

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

Statamic ImageBoss
==================

[](#statamic-imageboss)

[ImageBoss](https://imageboss.me/) integration for [Statamic CMS](https://statamic.com/).

Requirements
------------

[](#requirements)

- PHP 8.3+
- Laravel 12+
- Statamic 5 or 6

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

[](#installation)

```
composer require jorisnoo/statamic-imageboss
```

Publish the configuration:

```
php artisan vendor:publish --tag="imageboss-config"
```

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

[](#configuration)

Set your ImageBoss credentials in `.env`:

```
IMAGEBOSS_SOURCE=your-source
IMAGEBOSS_TOKEN=your-token  # optional, for URL signing
```

When `IMAGEBOSS_SOURCE` is not set, the package falls back to Statamic's Glide.

### Config Options

[](#config-options)

OptionDefaultDescription`source``null`ImageBoss source identifier`token``null`HMAC token for URL signing`base_url``https://img.imageboss.me`ImageBoss CDN base URL`default_width``1000`Default width for `url()``width_interval``200`Step size for srcset generation`presets`see configNamed preset configurations### Presets

[](#presets)

The package supports two approaches for defining presets: config-based and interface-based.

#### Option 1: Config-Based Presets

[](#option-1-config-based-presets)

Define presets in `config/statamic/imageboss.php`:

```
'presets' => [
    'thumbnail' => [
        'min' => 200,      // minimum srcset width
        'max' => 700,      // maximum srcset width
        'ratio' => 1,      // aspect ratio (optional)
        'interval' => 250, // width step (optional)
        'animation' => true, // preserve animated GIF frames (optional)
    ],
    'hero' => [
        'min' => 640,
        'max' => 3840,
    ],
],
```

#### Option 2: Interface-Based Presets

[](#option-2-interface-based-presets)

Implement the `ImagePreset` interface on your enum for self-contained presets:

```
use Noo\StatamicImageboss\Concerns\HasImagePresetHelpers;
use Noo\StatamicImageboss\Contracts\ImagePreset;

enum Preset: string implements ImagePreset
{
    use HasImagePresetHelpers;

    case Default = 'default';
    case Thumbnail = 'thumbnail';
    case Card = 'card';
    case Hero = 'hero';

    /**
     * @return array{min: int, max: int, ratio?: float, interval?: int, animation?: bool}
     */
    public function config(): array
    {
        return match ($this) {
            self::Default => ['min' => 320, 'max' => 2560],
            self::Thumbnail => ['min' => 200, 'max' => 700, 'ratio' => 1, 'interval' => 250],
            self::Card => ['min' => 300, 'max' => 800, 'ratio' => 4 / 5],
            self::Hero => ['min' => 640, 'max' => 3840],
        };
    }
}
```

The `HasImagePresetHelpers` trait provides convenience methods:

```
Preset::Hero->min();      // 640
Preset::Hero->max();      // 3840
Preset::Card->ratio();    // 0.8
Preset::Thumbnail->interval(); // 250
```

Usage
-----

[](#usage)

### PHP

[](#php)

```
use Noo\StatamicImageboss\Facades\ImageBoss;

// Single URL
$url = ImageBoss::from($asset)->width(800)->url();
$url = ImageBoss::from($asset)->width(800)->ratio(16/9)->url();

// Animated GIF (by default only the first frame is processed)
$url = ImageBoss::from($asset)->width(300)->animation()->url();

// Responsive srcset with preset
$srcset = ImageBoss::from($asset)->preset('hero')->srcsetString();
// Or
$srcset = ImageBoss::from($asset)->preset(Preset::Hero)->srcsetString();

// Custom configuration
$srcset = ImageBoss::from($asset)
    ->min(300)
    ->max(1200)
    ->interval(200)
    ->ratio(4/5)
    ->srcsetString();
```

### Antlers

[](#antlers)

```
// Single URL
{{ imageboss:url src="image" width="800" }}
{{ imageboss:url src="image" width="800" ratio="1.777" }}
{{ imageboss:url src="image" width="300" animation="true" }}

// Responsive srcset
{{ imageboss:srcset src="image" preset="hero" }}
{{ imageboss:srcset src="image" min="300" max="1200" interval="150" }}
```

Full example:

```

```

### Builder Methods

[](#builder-methods)

MethodDescription`width(int)`Set image width`height(int)`Set image height`ratio(float)`Set aspect ratio (width/height)`min(int)`Minimum width for srcset`max(int)`Maximum width for srcset`interval(int)`Width step for srcset`animation(bool)`Preserve animation for animated GIFs. By default ImageBoss only processes the first frame.`preset(string)`Apply preset configuration`url()`Generate single URL`rias()`Generate URL with `{width}` placeholder for lazysizes RIAS`srcset()`Generate srcset array`srcsetString()`Generate srcset string### Example Output

[](#example-output)

`url()` returns a single URL:

```
https://img.imageboss.me/your-source/width/800/format:auto/assets/image.jpg

```

`srcsetString()` returns a comma-separated srcset string:

```
https://img.imageboss.me/.../width/640/... 640w, https://img.imageboss.me/.../width/1280/... 1280w, https://img.imageboss.me/.../width/1920/... 1920w

```

`rias()` returns a URL with `{width}` and `{height}` placeholders for [lazysizes RIAS](https://github.com/aFarkas/lazysizes/tree/gh-pages/plugins/rias):

```
// Width only - no aspect ratio constraint
ImageBoss::from($asset)->rias();
// => https://img.imageboss.me/your-source/width/{width}/format:auto/assets/image.jpg

// With height - maintains aspect ratio via {height} placeholder
ImageBoss::from($asset)->height(630)->rias();
// => https://img.imageboss.me/your-source/cover/{width}x{height}/format:auto/assets/image.jpg

// With ratio - same result, height calculated by lazysizes
ImageBoss::from($asset)->ratio(16/9)->rias();
// => https://img.imageboss.me/your-source/cover/{width}x{height}/format:auto/assets/image.jpg
```

Lazysizes replaces `{width}` with the calculated width and `{height}` based on the `--ls-aspectratio` CSS variable.

> **Note:** RIAS URLs cannot be signed. The `{width}` and `{height}` placeholders are replaced at runtime by the client (e.g., lazysizes), which would invalidate any pre-computed signature. If you require signed URLs, use `srcsetString()` instead.

When an asset has a focal point set, it's automatically included in the URL:

```
https://img.imageboss.me/your-source/cover:800x450/fp:0.25,0.75/format:auto/assets/image.jpg

```

Assets without a focal point default to center (`fp-x:0.5,fp-y:0.5`) so cover crops stay centred instead of falling back to ImageBoss's smart-crop.

Features
--------

[](#features)

- Responsive srcset generation
- Focal point support (reads from asset data)
- URL signing with HMAC-SHA256
- Automatic Glide fallback

License
-------

[](#license)

MIT

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance92

Actively maintained with recent releases

Popularity16

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 94.7% 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 ~28 days

Recently: every ~37 days

Total

7

Last Release

38d ago

PHP version history (2 changes)0.1.0PHP ^8.2

0.4.0PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/0440b6ac994d5566a2ef5886fbac104a73f8458e70dbd20085e241ab0f647e0d?d=identicon)[jorgenoo](/maintainers/jorgenoo)

---

Top Contributors

[![jorisnoo](https://avatars.githubusercontent.com/u/5810772?v=4)](https://github.com/jorisnoo "jorisnoo (54 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

---

Tags

imagesresponsiveglidestatamicsrcsetStatamic addonimageboss

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/jorisnoo-statamic-imageboss/health.svg)

```
[![Health](https://phpackages.com/badges/jorisnoo-statamic-imageboss/health.svg)](https://phpackages.com/packages/jorisnoo-statamic-imageboss)
```

###  Alternatives

[dedoc/scramble

Automatic generation of API documentation for Laravel applications.

2.2k12.6M140](/packages/dedoc-scramble)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3915.5k](/packages/rawilk-profile-filament-plugin)[filament/support

Core helper methods and foundation code for all Filament packages.

2333.9M302](/packages/filament-support)[harris21/laravel-fuse

Circuit breaker for Laravel queue jobs. Protect your workers from cascading failures.

46273.9k](/packages/harris21-laravel-fuse)[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

25060.1k](/packages/vormkracht10-laravel-mails)[finller/laravel-media

A flexible media library for Laravel

472.1k](/packages/finller-laravel-media)

PHPackages © 2026

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