Skip to main content

Parameters

ParameterFull nameDescription
wwidthWidth in pixels
hheightHeight in pixels
ccropCrop/resize mode
araspect ratioCrop to a given ratio (W:H)
aangleRotation angle or auto
ggravityFocal point for cropping
bbackgroundBackground color (hex)
qqualityCompression level (1–100)
fformatOutput format

Parameter reference

w
integer
Width of the output image in pixels.w_800 · w_1920 · w_400
h
integer
Height of the output image in pixels.h_600 · h_1080 · h_400
c
string
default:"fill"
How the image is resized and cropped.
ValueBehavior
fillFill the area, cropping the overflow (default)
fitFit within dimensions, preserving aspect ratio
scaleStretch to exact dimensions (distorts if ratios differ)
cropResize and crop to exact dimensions
padFit and add background-colored borders
ar
string
Crop the image to a specific aspect ratio. Format: W:H.ar_16:9 · ar_1:1 · ar_4:3
a
string | number
Rotate the image. Use auto to rotate based on data, or a number (0–360) for a fixed angle.a_auto · a_90 · a_180
g
string
default:"center"
Focal point used when cropping.
ValueBehavior
centerCenter of the image (default)
northTop edge
southBottom edge
eastRight edge
westLeft edge
faceFace detection — keeps the detected face in frame
autoEntropy-based region of interest detection
b
string
Background color for c_pad or rotated images. Use rgb: followed by a 6-digit hex value.b_rgb:ffffff (white) · b_rgb:000000 (black) · b_rgb:f5f5f5 (light gray)
q
integer
default:"85"
Compression quality from 1 (smallest file) to 100 (highest quality).
RangeTrade-off
90–100High quality, larger file
80–89Recommended sweet spot
60–79Smaller file, slight quality loss
1–59Aggressive compression, visible artifacts
f
string
Force a specific output format. When omitted, the best format is chosen automatically based on the browser’s Accept header.
ValueNotes
avifBest compression (up to 50% vs JPEG)
webpExcellent compatibility, ~30% vs JPEG
jpeg / jpgUniversal fallback
pngLossless, supports transparency

Examples

GET /t/w_800,h_600/image.jpg
GET /t/ar_1:1,w_1080,g_face,q_85,f_webp/portrait.jpg
GET /t/w_400,h_300,c_pad,b_rgb:f5f5f5,q_80/thumbnail.jpg
Consistent dimensions with a light gray background on the borders.
GET /t/a_15,w_200,h_200/logo.png
GET /t/w_1920,h_1080,q_85,f_avif/landscape.jpg

Supported formats

Input: JPEG, PNG, WebP, AVIF, GIF (first frame), HEIC/HEIF (converted to JPEG on upload), PSD (layers composited) Output: AVIF, WebP, JPEG, PNG

Next steps

Automatic Format Selection

How Openinary picks the optimal format automatically.

Upload & Cache Warming

Pre-generate variants at upload time for instant first response.