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.3.2(3mo ago)0302MITPHPPHP ^8.2CI passing

Since Jan 21Pushed 3mo 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 yesterday

READMEChangelog (6)Dependencies (20)Versions (7)Used By (0)

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

[](#statamic-imageboss)

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

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

[](#requirements)

- PHP 8.3+
- Laravel 11+
- 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_SECRET=your-secret  # 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`secret``null`HMAC secret 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)
    ],
    '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}
     */
    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();

// 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" }}

// 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`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

```

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

39

—

LowBetter than 84% of packages

Maintenance82

Actively maintained with recent releases

Popularity15

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 98% 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 ~13 days

Total

6

Last Release

94d ago

### 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 (48 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

imagesresponsiveglidestatamicsrcsetimageboss

###  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

[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M47](/packages/spatie-laravel-pdf)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

816333.3k3](/packages/defstudio-telegraph)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)[codewithdennis/filament-select-tree

The multi-level select field enables you to make single selections from a predefined list of options that are organized into multiple levels or depths.

329530.5k29](/packages/codewithdennis-filament-select-tree)[filament/support

Core helper methods and foundation code for all Filament packages.

2331.0M245](/packages/filament-support)[harris21/laravel-fuse

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

44855.7k](/packages/harris21-laravel-fuse)

PHPackages © 2026

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