Download the PHP package jorisnoo/statamic-imageboss without Composer
On this page you can find all versions of the php package jorisnoo/statamic-imageboss. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jorisnoo/statamic-imageboss
More information about jorisnoo/statamic-imageboss
Files in jorisnoo/statamic-imageboss
Package statamic-imageboss
Short Description ImageBoss integration for Statamic with Glide fallback
License MIT
Homepage https://github.com/jorisnoo/statamic-imageboss
Informations about the package statamic-imageboss
Statamic ImageBoss
ImageBoss integration for Statamic CMS.
Requirements
- PHP 8.3+
- Laravel 11+
- Statamic 5 or 6
Installation
Publish the configuration:
Configuration
Set your ImageBoss credentials in .env:
When IMAGEBOSS_SOURCE is not set, the package falls back to Statamic's Glide.
Config Options
| Option | Default | Description |
|---|---|---|
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 config | Named preset configurations |
Presets
The package supports two approaches for defining presets: config-based and interface-based.
Option 1: Config-Based Presets
Define presets in config/statamic/imageboss.php:
Option 2: Interface-Based Presets
Implement the ImagePreset interface on your enum for self-contained presets:
The HasImagePresetHelpers trait provides convenience methods:
Usage
PHP
Antlers
Full example:
Builder Methods
| Method | Description |
|---|---|
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
url() returns a single URL:
srcsetString() returns a comma-separated srcset string:
rias() returns a URL with {width} and {height} placeholders for lazysizes RIAS:
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, usesrcsetString()instead.
When an asset has a focal point set, it's automatically included in the URL:
Features
- Responsive srcset generation
- Focal point support (reads from asset data)
- URL signing with HMAC-SHA256
- Automatic Glide fallback
License
MIT
All versions of statamic-imageboss with dependencies
illuminate/contracts Version ^11.0||^12.0||^13.0
spatie/laravel-package-tools Version ^1.92.7
statamic/cms Version ^5.73||^6.0