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).
  • 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.
  • 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.