ImagorProvider

Generates Imagor transformation URLs. Self-hosted, Go-based image processing server (Thumbor-compatible).

use Timber\Chainsaw\Provider\Imagor\ImagorProvider;
use Timber\Chainsaw\Signer\Algorithm;
use Timber\Chainsaw\Signer\HmacUrlSigner;

$provider = new ImagorProvider(
    host: 'http://localhost:8083',
    signer: new HmacUrlSigner(key: 'mysecret', algorithm: Algorithm::Sha1), // optional
);

Output: {host}/{signature|unsafe}/{manualCrop}/{fitMode}/{w}x{h}/{align}/{smart}/filters:{filters}/{source}

Imagor signing defaults to HMAC-SHA1; pass algorithm: Algorithm::Sha256 to match IMAGOR_SIGNER_TYPE=sha256. Use length: N to truncate the raw HMAC before base64url encoding (matches IMAGOR_SIGNER_TRUNCATE).

Manipulation support

Legend: ✅ = implemented in Chainsaw, ⚠️ = supported with caveats, 🟦 = available on the CDN, not exposed by Chainsaw, ❌ = not available on this CDN.

Resize & crop

Manipulation Chainsaw Availability
Width Free
Height Free
Scale No scale-by-factor primitive; use width()/height()
Cover Free (crop() alias; compass / focal / smart anchors)
ManualCrop Free
Contain Free
Pad Free
Stretch Free
CropToRatio No aspect-ratio-only crop; use cover() with absolute dims
PadToRatio No aspect-ratio-only pad; use pad() with absolute dims
Proportion 🟦 Free (scale by percentage)
Smart crop 🟦 Free (content-aware)
Trim Free

Filters & effects

Manipulation Chainsaw Availability
Blur Free
Sharpen Free
Brightness Free
Contrast Free
Gamma
Pixelate Free
Greyscale Free
Sepia
Saturation Free
Hue Free (rotation by angle)
Negate
RGB channels 🟦 Free (per-channel adjustment)

Compositing

Manipulation Chainsaw Availability
Image compositing 🟦 Free (image() filter with 15 blend modes: normal, multiply, screen, overlay, darken, lighten, color-dodge, color-burn, hard-light, soft-light, difference, exclusion, add, mask, mask-out)
Text overlays 🟦 Free (text() with Pango fonts, alignment, wrapping, line spacing, blend modes)

Detection

Manipulation Chainsaw Availability
Redact 🟦 Free (auto-detect + obscure regions; requires detector plugin)
Redact oval 🟦 Free (elliptical mask for face shapes)
Draw detections 🟦 Free (color-coded bounding boxes)

Decoration & orientation

Manipulation Chainsaw Availability
Background Free
Border Not available — throws UnsupportedManipulator
Flip Free
Rotate ⚠️ Free; 90/180/270 only — arbitrary angles throw UnsupportedManipulator
AutoOrient Free; EXIF orientation applied implicitly by default
Watermark Free
Round corners 🟦 Free (radius + background color)
Fill modes 🟦 Free (blur, auto average color, none transparent – beyond solid color)

Special

Manipulation Chainsaw Availability
BlurHash
ThumbHash
Dither
Strip EXIF 🟦 Free
Strip ICC 🟦 Free (with sRGB conversion)
Color space conversion 🟦 Free (to_colorspace – sRGB, P3, CMYK)
DPI 🟦 Free (for PDF/SVG rendering)
Page selection 🟦 Free (PDF page or animation frame)
Max frames 🟦 Free (limit animation)
Max bytes 🟦 Free (auto quality degradation)
No upscale 🟦 Free
Proportion 🟦 Free (scale by percentage)
Average color 🟦 Free (metadata endpoint)
URL expiration 🟦 Free

Encoding

Format Supported
JPEG
PNG
WebP
AVIF
GIF
Auto format ❌ (silently ignored)
Quality

Concrete formats are emitted via the format(...) filter; Format::Auto is silently skipped (set an explicit format or compose a <picture> with typed sources).

Notes

  • Gamma, Sepia, and Border are not available in Imagor — they throw UnsupportedManipulator.
  • Thumbor-compatible – Imagor is a Go reimplementation of Thumbor with a compatible URL scheme but additional features (blend modes, text overlays, color space conversion).
  • Blur – Imagor’s blur(sigma) takes a libvips gaussian sigma (unlike Thumbor’s blur(radius[,sigma])), so the handler emits round(radius / 2) to sit on the σ ≈ radius/2 anchor shared across providers.
  • Auto-orientation – Imagor auto-orients from EXIF by default, so Orientation::Auto and Orientation::Rotate0 are no-ops.
  • Watermark – requires both w_ratio and h_ratio (6 args) to trigger resizing. Negative position values anchor from right/bottom edges. A width/height box emits both ratios so the mark fits inside it keeping aspect; a single axis leaves the other none and scales proportionally.
  • Watermark fit – imagor fits the mark within its box keeping the aspect ratio, which is WatermarkFit::Contain (the default). Fill, Stretch and Crop have no imagor equivalent and throw UnsupportedManipulator.
  • Image compositing – Imagor’s image() filter is significantly more powerful than simple watermarks, supporting 15 Photoshop-style blend modes.
  • Color encoding – strips # from hex colors (e.g. bg:3b82f6).
  • ThumbHash – Imagor exposes a native ThumbHash metadata endpoint (/meta/...) that returns the raw hash string. Chainsaw’s ->thumbHash() produces a decoded preview image (via InterventionProvider only) and does not currently wire Imagor’s metadata endpoint. A future driver-level integration could surface the endpoint for apps that want the raw hash.