ThumborProvider

Generates Thumbor transformation URLs. Self-hosted, open-source image processing server.

use Timber\Chainsaw\Provider\Thumbor\ThumborProvider;
use Timber\Chainsaw\Signer\Algorithm;
use Timber\Chainsaw\Signer\HmacUrlSigner;

$provider = new ThumborProvider(
    host: 'http://localhost:8084',
    signer: new HmacUrlSigner(key: 'thumbor-secret', algorithm: Algorithm::Sha1), // optional
);

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

Thumbor signing is HMAC-SHA1 by default (the libthumbor reference). Pass algorithm: Algorithm::Sha256 if your Thumbor instance is configured for it.

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 / smart anchors β€” focal() throws, Thumbor needs a rectangle not a point)
ManualCrop βœ… Free
Contain βœ… Free
Pad βœ… Free
Stretch βœ… Free (via stretch() filter)
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/face detection)
Trim βœ… Free
Extract focal points 🟦 Free (return focal point data)

Filters & effects

Manipulation Chainsaw Availability
Blur βœ… Free
Sharpen βœ… Free
Brightness βœ… Free
Contrast βœ… Free
Gamma ❌
Greyscale βœ… Free
Sepia ❌
Pixelate ❌
Saturation βœ… Free
Hue ❌
Negate ❌
Equalize 🟦 Free (histogram equalization)
Noise 🟦 Free
Convolution 🟦 Free (custom kernel)
RGB channels 🟦 Free (per-channel adjustment)
Red-eye removal 🟦 Free

Decoration & orientation

Manipulation Chainsaw Availability
Background βœ… Free
Border ❌ Not available β€” no canvas-expanding border primitive
Flip βœ… Free
Rotate ⚠️ Free; 90/180/270 only β€” arbitrary angles throw UnsupportedManipulator
AutoOrient βœ… Free; no-op at URL level (EXIF auto-orient is controlled server-side via RESPECT_ORIENTATION)
Watermark βœ… Free
Round corners 🟦 Free (radius + background color)

Special

Manipulation Chainsaw Availability
BlurHash ❌
ThumbHash ❌
Dither ❌
Strip EXIF 🟦 Free
Strip ICC 🟦 Free
Max bytes 🟦 Free (auto quality degradation)
No upscale 🟦 Free
Smart cover (native) 🟦 Free (Thumbor’s native cover thumbnail mode β€” distinct from the Cover resize manipulator above)
AutoJPG 🟦 Free

Encoding

Format Supported
JPEG βœ…
PNG βœ…
WebP βœ…
AVIF βœ…
GIF βœ…
Auto format ❌
Quality βœ…

Notes

  • Gamma, Sepia, Pixelate, Hue, Negate, Border are not available in Thumbor β€” these manipulators throw UnsupportedManipulator.
  • Cover – cover() (and its crop() alias) accepts compass and smart anchors. focal() throws: Thumbor expects a focal rectangle, not a point. Scale, CropToRatio, and PadToRatio are registered but throw at URL-build time (no scale-by-factor or aspect-ratio-only primitive); specify absolute dimensions via cover()/pad() instead.
  • Stretch – implemented as a Thumbor filter (stretch()), not a path segment.
  • Sharpen – amount divided by 10, uses fixed radius 0.3 and luminance-only sharpening.
  • Saturation – throws on .gif sources: Thumbor’s saturation filter silently no-ops on animated GIFs.
  • Watermark – uses watermark({url},{x},{y},{transparency},{w_ratio},{h_ratio}) filter. Negative position values anchor from right/bottom edges.
  • Smart crop – Thumbor’s signature feature. Uses content analysis and face detection to find the best crop region.
  • AutoOrient – no-op at URL level; EXIF auto-orientation is controlled server-side via RESPECT_ORIENTATION.
  • Auto format – Format::Auto is silently ignored (skipped in applyEncoding); set an explicit format or compose a <picture> with typed sources.
  • HMAC signing – supported via path prefix.