Source format
No out parameter keeps the format of the pristine image.
(no transformation)
Self-hosted image transformations over HTTP: resize, crop around faces and features, colour work, compositing, and background removal. Output formats are negotiated per client. Everything below is rendered live by this server.
The service picks an output format from what the client accepts. These switches change the
Accept header used for every request on this page, so you can see what a different device
would get.
GET /process?url=<source>&im=<transformations>[&out=auto][&prefer=avif,webp,jxl][&quality=90]
| parameter | description |
|---|---|
url | Absolute http or https URL of the pristine image. Hosts are restricted by configuration. |
im | Transformation chain, separated by ;, applied left to right. |
imop | Alias for im. |
width, height | Shortcut for a resize. |
out | jpeg, png, webp, avif, jxl are encoded as asked. auto negotiates. Omitted keeps the source format. |
prefer | Preference order for negotiation, for example avif,webp,jxl. The first format the client accepts wins. |
quality | 1 to 100, default 90. Mapped per encoder. |
nocache | Recompute instead of reading the cache. |
Derivatives are cached in /app/cache for 1h30m0s, keyed by source,
transformation chain, format, and quality. Responses carry ETag, Cache-Control and
Vary: Accept; the X-Cache chip on each card shows whether it came from disk. A negotiated
format switches to PNG rather than dropping an alpha channel.
No out parameter keeps the format of the pristine image.
(no transformation)
Widely supported, carries an alpha channel.
out=webp
Usually the smallest of the three at the same quality, and the slowest to encode.
out=avif
Supported by few browsers today; useful when the client is known.
out=jxl
out=auto picks the first format the client accepts, from avif, webp, jxl.
out=auto
prefer sets that order explicitly, here webp before avif.
out=auto&prefer=webp,avif,jxl
Quality is mapped per encoder; 1 to 100, default 90.
quality=20
A negotiated format switches to PNG when a transformation adds an alpha channel.
im=Resize,width=300;Rotate,degrees=15
Resize=(width,height) resizes to exact dimensions.
im=Resize=(300,150)
Omit a dimension to keep the aspect ratio.
im=Resize,width=220
Scale by a factor of the current size.
im=Scale,width=0.25,height=0.25
Fit inside the box and fill the rest with a blurred copy.
im=FitAndFill=(320,320)
Crop a rectangle, optionally with a gravity.
im=Crop,rect=(0,0,300,300),gravity=Center
allowExpansion pads with transparency instead of clamping.
im=Crop,size=(1200,300),allowExpansion&out=png
Crop to an aspect ratio; xPosition/yPosition pick the kept region.
im=AspectCrop=(16,9),xPosition=.5,yPosition=.3
allowExpansion adds transparent pixels instead of cropping.
im=AspectCrop=(1,1),allowExpansion&out=png
Shrink or expand each edge relative to the current size.
im=RelativeCrop,north=100,south=100,east=50,west=50
Crop around a focal point.
im=RegionOfInterestCrop=(300,300),regionOfInterest=(300,220)
Crop around the most prominent features.
im=FeatureCrop,size=(300,300)
Crop around detected faces.
im=FaceCrop,width=300,height=300
Faces when present, features otherwise.
im=SmartCrop,size=(300,300)
Trim uniform edges.
im=Trim,tolerance=0.05;Resize,width=300
Flip horizontally or vertically.
im=Mirror,horizontal;Resize,width=300
Positive degrees rotate clockwise; the canvas grows.
im=Resize,width=300;Rotate,degrees=13&out=png
Slant into a parallelogram.
im=Resize,width=300;Shear,x=0.3&out=png
Distort the image; chaos ranges from 0 to 1.
im=Resize,width=300;Goop,chaos=1
Render in shades of gray.
im=Resize,width=300;Grayscale
Values above 1 increase contrast.
im=Resize,width=300;Contrast,contrast=1.6
Hue rotation plus saturation and lightness multipliers.
im=Resize,width=300;HSL,hue=0.2,saturation=1.6,lightness=1.1
Same idea using value instead of lightness.
im=Resize,width=300;HSV,hue=0.5,saturation=2,value=1
Force every hue to one value, in degrees.
im=Resize,width=300;MonoHue,hue=210
Reduce the palette to shrink the file.
im=Resize,width=300;MaxColors,colors=8
Fill transparency with a color.
im=Resize,width=300;Rotate,degrees=13;BackgroundColor,color=00ff00
Multiplier on the current opacity.
im=Resize,width=300;Opacity=0.35&out=png
Remove a hue range, green by default.
im=Resize,width=300;ChromaKey,hue=40,hueTolerance=0.15&out=png
Remove one color with tolerance and feathering.
im=Resize,width=300;RemoveColor,color=e8e2d8,tolerance=0.08,feather=0.05&out=png
Cut the subject out with a locally executed segmentation model, no hosted service involved.
im=Resize,width=320;BackgroundRemove,fallback=color&out=png
threshold turns the soft mask into a firmer cut-out; feather controls the ramp.
im=Resize,width=320;BackgroundRemove,threshold=0.6,feather=0.05,fallback=color&out=png
Chain BackgroundColor to drop the subject onto a flat colour.
im=Resize,width=320;BackgroundRemove,fallback=color;BackgroundColor,color=0b7285
method=color needs no model at all. It suits clean backdrops like this one, not busy scenes.
im=Resize,width=320;BackgroundRemove,method=color&out=png
The same cut-out dropped onto a flat colour.
im=Resize,width=320;BackgroundRemove,method=color;BackgroundColor,color=0b7285
Remove one specific colour instead of learning it from the border.
im=Resize,width=320;RemoveColor,color=eceae4,tolerance=0.1,feather=0.05&out=png
Gaussian blur; higher is blurrier.
im=Resize,width=300;Blur=4
Sharpen edges and detail.
im=Resize,width=300;UnsharpMask,gain=3
Overlay another image, for example a watermark.
im=Resize,width=300;Composite,image=(url={sample}),gravity=SouthEast,scale=0.1,opacity=0.7
placement=under puts the source image on top.
im=Resize,width=300;Rotate,degrees=10;Composite,image=(url={sample}),placement=under,gravity=Center,scale=0.4
Place another image beside the source.
im=Resize,width=200;Append,image=(url={sample}),gravity=East
Branch on the current width or height.
im=IfDimension,value=500,dimension=width,greaterThan=$(Resize=(300,200)),lessThan=$(Grayscale)
Branch on portrait, landscape, or square.
im=IfOrientation,landscape=$(Resize=(300,169)),portrait=$(Resize=(169,300)),square=$(Resize=(300,300))
Transformations run left to right, separated by semicolons.
im=AspectCrop=(1,1);Resize,width=300;Grayscale;Blur=2
The imop parameter is an alias for im.
imop=Resize,width=300,height=150
Bare width and height still resize.
width=300&height=150