ImgixProvider

Generates imgix transformation URLs. One of the most complete URL providers.

use Timber\Chainsaw\Provider\Imgix\ImgixProvider;
use Timber\Chainsaw\Signer\Algorithm;
use Timber\Chainsaw\Signer\SignatureEncoding;
use Timber\Chainsaw\Signer\HashUrlSigner;

$provider = new ImgixProvider(
    host: 'https://example.imgix.net',
    // Optional URL signing — imgix's scheme is md5(token + path + query), hex:
    token: $_ENV['IMGIX_TOKEN'],
    signer: new HashUrlSigner(algorithm: Algorithm::Md5, encoding: SignatureEncoding::Hex),
);

Output: {host}/{source}?w=800&h=600&fit=crop&s={signature}

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 Paid
Height Paid
Scale No scale-by-factor primitive; use width()/height()
Cover Paid (crop() alias; compass, focal, smart/edges, entropy & face anchors)
ManualCrop Paid
Contain Paid
Pad Paid
Stretch Paid
CropToRatio Paid (ar + fit=crop)
PadToRatio Paid (ar + fit=fill)
Trim Paid (color tolerance, alpha, padding)
Aspect ratio 🟦 Paid (ar)
Min/max width/height 🟦 Paid (min-w, max-w, min-h, max-h)
Source rectangle 🟦 Paid (rect pre-crop)
Face crop 🟦 Paid (crop=faces, faceindex, facepad)

Filters & effects

Manipulation Chainsaw Availability
Blur Paid
Sharpen Paid
Brightness Paid
Contrast Paid
Gamma Paid
Pixelate Paid
Greyscale Paid (via sat=-100)
Sepia Paid
Saturation Paid
Exposure 🟦 Paid
Highlight 🟦 Paid
Shadow 🟦 Paid
Hue shift Paid
Vibrance 🟦 Paid
Negate / Invert Paid
Unsharp mask 🟦 Paid (radius control)
Noise reduction 🟦 Paid (bound + sharpen)
Auto enhance 🟦 Paid
Auto red-eye 🟦 Paid

Stylize

Manipulation Chainsaw Availability
Duotone 🟦 Paid (two-color + alpha)
Halftone 🟦 Paid (dot pattern, angle control)
Monochrome 🟦 Paid (single color)

Generative AI

Manipulation Chainsaw Availability
AI upscale / super-resolution 🟦 Paid (up to 4x)
Background removal 🟦 Paid (shadow, semi-transparency)
Background replacement 🟦 Paid (prompt + negative prompt)
Generative fill 🟦 Paid (prompt, position, seed)
Object removal 🟦 Paid (rect or text prompt)
Text to image 🟦 Paid

Face & detection

Manipulation Chainsaw Availability
Face blur 🟦 Paid
Face pixelation 🟦 Paid
License plate blur 🟦 Paid
Face data (JSON) 🟦 Paid

Decoration & orientation

Manipulation Chainsaw Availability
Background Paid
Border All BorderType variants with Unit::Pixel; see notes for Expand ordering
Flip Paid
Rotate ⚠️ Paid; 90/180/270 only — arbitrary angles throw UnsupportedManipulator
AutoOrient Paid; EXIF orientation applied implicitly by default
Watermark Paid
Text overlays 🟦 Paid (full typography)
Image blending 🟦 Paid (Photoshop-style blend modes)
Mask shapes 🟦 Paid (corner radius, background)

Special

Manipulation Chainsaw Availability
BlurHash
ThumbHash
Dither
Color palette extraction 🟦 Paid (CSS or JSON output)
Color space / ICC 🟦 Paid
PDF page selection 🟦 Paid
Progressive JPEG 🟦 Paid
Chroma subsampling 🟦 Paid
Color quantization 🟦 Paid
Lossless 🟦 Paid
SVG sanitization 🟦 Paid
Gradient fill 🟦 Paid (for padding)

Animation

Manipulation Chainsaw Availability
Loop count 🟦 Paid
Frame selection/skip 🟦 Paid
FPS 🟦 Paid
Reverse 🟦 Paid
GIF to MP4/WebM 🟦 Paid

Encoding

Format Supported
JPEG
PNG
WebP
AVIF
GIF
Auto format
Quality

Notes

  • Among the most complete URL providers – only Cloudinary implements more manipulators (imgix lacks a scale-by-factor primitive), with dozens more available on the platform.
  • Blurblur = radius × 2. imgix’s blur parameter (0…2000) renders ≈ 4.4× a gaussian sigma (measured), so ×2 targets the σ ≈ radius/2 anchor shared across providers.
  • Gamma – imgix gam is a percentage in -100..100 (default 0 = unchanged). Chainsaw’s multiplier is translated as pct = round((gamma - 1) * 100) and clamped; gamma(1.0)gam=0, gamma(2.0)gam=100 (saturated at max).
  • BorderOverlay maps to imgix border=w,color; Shrink and Expand map to pad=w&border=w,color. Using imgix’s native border overlay (rather than bg) preserves the interior alpha channel of transparent sources — bg would flatten every transparent pixel onto the border colour. Because imgix pad shrinks the image to fit within any pinned w/h, Expand works by bumping those dimensions by 2×width at URL-generation time. This requires .width()/.height()/.crop() to appear before .border(..., BorderType::Expand) in the fluent chain — otherwise the later resize handler overwrites the bumped dimensions and the effect degrades to Shrink. Unit::Percent throws UnsupportedManipulator.
  • Trim – tolerance maps from 0…100 to 0…442 (imgix’s Euclidean RGB distance range).
  • Watermark fit – with a width/height box, mark-fit carries the fit: Contain uses imgix’s default clip (fits inside the box keeping aspect, so no token is emitted), Stretchmark-fit=scale (distorts to the box), Fill/Cropmark-fit=crop (covers the box and crops the overflow). A single axis scales proportionally and emits no mark-fit.
  • URL signing – optional; requires both token (the Secure URL Token from the imgix dashboard) and a signer. imgix’s scheme is md5(token + path + query) in hex, so the signer is HashUrlSigner(algorithm: Algorithm::Md5, encoding: SignatureEncoding::Hex). With only one of the two configured, URLs are emitted unsigned.
  • imgix is a paid SaaS product – all features require a subscription.
  • imgix has the broadest native feature set alongside Cloudinary, especially for AI/ML capabilities.