Clawdy
Guides

Image Transformations

Resize, crop, convert, and apply filters to images on the fly

Overview

Clawdy supports on-the-fly image transformations. Append query parameters to any file URL to resize, crop, convert formats, apply filters, and more — no extra configuration required.

https://your-server.com/f/{fileId}?w=300&h=300&fit=cover

When no transform parameters are present, the original file is served as-is. When parameters are present, the image is processed and the transformed result is streamed back.

Transformed images are cached for 24 hours. Repeated requests for the same transformation are served from cache instantly.


Resize

Control the output dimensions.

ParameterDescriptionExample
wWidth in pixels?w=300
hHeight in pixels?h=200
fitHow the image fits the target dimensions?w=300&h=300&fit=cover
dprDevice pixel ratio (1-8)?w=300&dpr=2
weWithout enlargement (don't upscale)?w=1000&we

Examples

Scale to width:

/f/{id}?w=400
Resized to 400px wide

Exact dimensions with cover crop:

/f/{id}?w=600&h=200&fit=cover
Cover crop to 600x200

Fit Modes

Control how the image fills the target dimensions when both w and h are set.

ValueBehavior
insideFit within bounds, preserve aspect ratio (default)
outsideFill at least the bounds, preserve aspect ratio
coverCrop to fill the exact dimensions
containLetterbox with background color
fillStretch to fill (ignores aspect ratio)

Examples

fit=cover — crops to fill exactly:

/f/{id}?w=300&h=300&fit=cover
fit=cover

fit=contain — letterboxed with background:

/f/{id}?w=300&h=300&fit=contain&bg=1a1a1a
fit=contain

Crop

Smart Cropping

Use the a (alignment) parameter with fit=cover to control crop position.

ValueBehavior
centerCenter of the image (default)
top, bottom, left, rightEdge alignment
top-left, top-right, bottom-left, bottom-rightCorner alignment
attentionFocus on the most visually interesting area
entropyFocus on the area with the most detail
focalUse focal point coordinates (fpx, fpy)

Examples

Attention crop — auto-focuses on the subject:

/f/{id}?w=400&h=300&fit=cover&a=attention
Attention crop

Focal point crop — specify where to focus (70% from left, 30% from top):

/f/{id}?w=400&h=300&fit=cover&a=focal&fpx=0.7&fpy=0.3
Focal point crop

Rectangle Crop

Crop a specific region before resizing.

ParameterDescription
cxCrop X offset (pixels or percentage)
cyCrop Y offset (pixels or percentage)
cwCrop width
chCrop height
precropApply crop before resize
/f/{id}?cx=100&cy=50&cw=400&ch=400&precrop

Format Conversion

Convert the output to a different format.

ParameterDescriptionValues
outputOutput formatjpg, png, webp, avif, gif, tiff
qQuality (1-100)Default: 80
llLossless compressionWebP, AVIF
ilInterlace / progressive loadingJPEG, PNG

Examples

Convert to WebP (smaller file size):

/f/{id}?output=webp&q=75

Convert to AVIF (best compression):

/f/{id}?output=avif&q=60

Progressive JPEG:

/f/{id}?output=jpg&q=85&il

Adjustments

ParameterDescriptionRange
blurGaussian blur0.3 - 1000
sharpSharpen0.000001 - 10
conContrast-100 to 100
gamGamma correction1.0 - 3.0
modModulate (brightness, saturation, hue)Comma-separated
tintApply color tintColor value

Examples

Blur ?blur=10

Blurred

Sharpen ?sharp=3

Sharpened

High contrast ?con=50

High contrast

Bright + saturated ?mod=1.3,1.5,0

Bright and saturated

Filters

ParameterDescriptionValues
filtApply a filter effectgreyscale, sepia, duotone, negate
startDuotone start colorDefault: C83658
stopDuotone stop colorDefault: D8E74F

Examples

Greyscale ?filt=greyscale

Greyscale

Sepia ?filt=sepia

Sepia

Duotone ?filt=duotone&start=0A1A2F&stop=E8D5B7

Duotone

Negate ?filt=negate

Negate

Shape Masks

Apply a shape mask to the image — useful for avatars and profile pictures.

ValueShape
circleCircle
ellipseEllipse
triangleTriangle
squareRounded square
starStar
heartHeart
pentagonPentagon
hexagonHexagon

Examples

Circle mask
circle
Hexagon mask
hexagon
Star mask
star
Heart mask
heart

Orientation

ParameterDescription
flipMirror vertically
flopMirror horizontally
roRotate by degrees

Examples

Rotate 90 degrees:

/f/{id}?ro=90&w=300
Rotated 90 degrees

Mirror horizontally:

/f/{id}?flop&w=400
Mirrored

Common Recipes

Thumbnail

/f/{id}?w=150&h=150&fit=cover&output=webp&q=70
Thumbnail

Profile Avatar

/f/{id}?w=128&h=128&fit=cover&mask=circle&output=webp
Avatar

Hero Image (optimized)

/f/{id}?w=1200&h=630&fit=cover&output=webp&q=80

Blurred Placeholder (LQIP)

Generate a tiny blurred image for progressive loading:

/f/{id}?w=32&h=32&blur=10&output=webp&q=20
LQIP placeholder

Responsive srcset

<img
  src="/f/{id}?w=800&output=webp"
  srcset="
    /f/{id}?w=400&output=webp 400w,
    /f/{id}?w=800&output=webp 800w,
    /f/{id}?w=1200&output=webp 1200w
  "
  sizes="(max-width: 600px) 400px, (max-width: 1024px) 800px, 1200px"
/>

Retina Display

/f/{id}?w=300&h=300&dpr=2

Color Values

Parameters that accept colors (bg, tint, start, stop) support:

FormatExample
Named colorsblack, white, red (140 CSS colors)
3-digit hexCCC
6-digit hexCCCCCC
4-digit ARGB5CCC (with alpha)
8-digit ARGB55CCCCCC (with alpha)

Caching

TypeCache Duration
Original files (no params)1 hour (max-age=3600)
Transformed images24 hours (max-age=86400)

Transformations are deterministic — the same parameters always produce the same result, so caching is safe and automatic.

On this page