Skip to main content
The CDN URL is the API. Any combination of parameters produces a deterministic URL with a stable cache key — same params, same cached bytes worldwide.
GET https://cdn.convertly.sh/{deliveryKey}/{fileId}?w=600&h=400&q=auto&format=auto&fit=cover&gravity=auto
ParamValueDefault
wOutput width in pixels (16–4000).source width
hOutput height in pixels (16–4000).source height
qOutput quality (20–100), or auto for content-aware.80
format (f)auto, webp, avif, jpeg, png.auto
dprDevice pixel ratio multiplier (1-4). w=400&dpr=2 returns 800 physical pixels.1
fitcover, contain, fill, inside, outside.cover
gravity (g)auto, smart, face, entropy, center, north, south, east, west, northeast, northwest, southeast, southwest.auto
fpManual focal point x,y in [0,1] or percentages. Centres the crop on this point.
cropSet to smart to run content-aware analysis instead of saliency. Equivalent to gravity=smart.
trim (trimAlpha, trim-alpha)Crop away fully transparent borders. Ideal for logos and PNG/WebP cutouts with alpha. Accepts 1, true, yes, or on.false
rotate (rot)Rotate by degrees (-360 to 360).0
flip / flopVertical / horizontal mirror. Accepts 1, true, yes, or on.false
bgHex background for rotation/padding. Supports alpha.transparent
padAdd equal padding around the image (0-1000).0
borderAdd equal border around the image (0-400).0
borderColorHex border color. Supports alpha.#000000
radius (r)Rounded-corner radius in pixels.0
watermark (mark)Stored image file ID to overlay as a watermark. Same workspace only.
markWWatermark width in pixels. Defaults to 18% of final image width.auto
markScale (mark-scale)Scale watermark to a percentage of the base image width (0100). Overrides default width when set.auto
markRot (mark-rot)Rotate watermark counter-clockwise (0359).0
markTile (mark-tile)Tile the watermark across the image. Valid value: grid.single mark
markOpacityWatermark opacity (0.05-1).0.78
markPositionOne of 7 anchor positions.bottom-right
markPadWatermark margin from the image edge.24
textText overlay (URL-encoded, max 120 chars).
textColorHex color for text.#ffffff
textSizeFont size in pixels (8–256).48
textPositionOne of 8 anchor positions.bottom-center
textFontsans, serif, mono.sans
textBgOptional hex background pill behind text.none
pixelate (px)Pixelate the full image. 0 disables; 1-100 controls block size.0
blurFacesBlur detected faces. Accepts 1, true, yes, or on.false
faceBlurBlur strength for blurFaces (1-100).32
pixelateFacesPixelate detected faces instead of blurring them. Accepts 1, true, yes, or on.false
facePixelatePixel block size for pixelateFaces (2-100).16
blurRegionBlur an explicit x,y,w,h output-pixel region.
pixelateRegionPixelate an explicit x,y,w,h output-pixel region.
plateRegionAlias for blurring a license-plate x,y,w,h region.
regionsMultiple regions: `blur:x,y,w,h:amountpixelate:x,y,w,h:amountplate:x,y,w,h`.
presetReference a named preset.
t / timeFor video files in Convertly Storage: extract a poster frame at this timestamp in seconds, then apply image transforms.1 when poster params are used
posterSet to 1 to extract a poster frame from a stored video before applying image transforms.
sHMAC signature for gated content.

Format negotiation

format=auto (the SDK default) tells the CDN to pick the best format per request based on the browser’s Accept header:
  • AVIF for clients that advertise image/avif
  • WebP for clients that advertise image/webp
  • JPEG fallback for older browsers
<img src="https://cdn.convertly.sh/cvly_pub_.../{fileId}?w=1200&format=auto" alt="…" />
The CDN sets Vary: Accept so the edge cache stays correct without poisoning — you’ll see at most two cache variants per URL (modern + JPEG) which is what you want. To force a specific format, pass it explicitly: format=webp, format=avif, format=jpeg, or format=png.
Placeholder: format=auto example

Trim transparent borders

PNG, WebP, and other images with an alpha channel often ship with extra transparent padding around the subject — common for logos exported from design tools. Pass trim=1 to crop away fully transparent pixels before resize and encode:
https://cdn.convertly.sh/{deliveryKey}/{fileId}?trim=1&w=400&format=webp
Aliases: trimAlpha=1, trim-alpha=1. Works in named presets too. Trim runs after EXIF auto-orient and before smart crop / resize, so the bounding box reflects the visible artwork.
Placeholder: before trim
Placeholder: after trim

Video poster frames

Stored video files in Convertly Storage can return an optimized image when you pass poster or image-format params. Convertly extracts a frame with FFmpeg, then runs the normal image transform pipeline (resize, format negotiation, smart crop, etc.).
https://cdn.convertly.sh/{deliveryKey}/{videoFileId}?t=3.5&w=800&format=webp
https://cdn.convertly.sh/{deliveryKey}/{videoFileId}?poster=1&w=1200&format=auto
ParamPurpose
t or timeTimestamp in seconds for the frame to extract.
poster=1Explicit poster mode (useful with presets).
w, h, format, gravity, …Same image params as raster sources.
Without poster or image-format params, bare video URLs redirect to a signed download (302).
Placeholder: video poster frame

Video delivery transforms

Use video output formats (mp4, webm, mov) to trim, resize, and transcode stored videos from the same CDN URL:
https://cdn.convertly.sh/{deliveryKey}/{videoFileId}?format=mp4&w=1280&q=80
https://cdn.convertly.sh/{deliveryKey}/{videoFileId}?format=webm&so=5&du=15&mute=1
https://cdn.convertly.sh/{deliveryKey}/{videoFileId}?format=gif&so=2&du=4&w=480&fps=12
ParamPurpose
format / f / fmOutput container: mp4, webm, mov, or gif.
so / start / ssClip start time in seconds.
du / durationClip length in seconds (max 300).
eo / endClip end time in seconds (alternative to duration).
w, hScale output (maintains aspect ratio).
qEncode quality hint (20100, maps to encoder CRF).
mute=1 / an=1Strip audio track.
fpsGIF frame rate (424, default 12).
gif=1Same as format=gif.
Embed transformed clips directly:
<video src="https://cdn.convertly.sh/marketing/demo-clip?format=mp4&w=1280&so=0&du=30" controls />
For full async video pipelines (storyboards, audio extract, streaming packaging), use the media tools API or video streaming product.
Placeholder: video transcode example

Content-aware quality

q=auto lets the CDN pick a quality based on what’s in the image. Photos compress well at lower quality without visible loss; flat graphics and screenshots need higher quality to avoid banding and ringing. Convertly analyzes the source on the first request and picks a quality from this band:
Image typeAuto quality
Flat graphic / logo92
Illustration / screenshot88
Mixed content82
Photo76
Very high-detail photo72
<img src="https://cdn.convertly.sh/cvly_pub_.../{fileId}?w=1200&q=auto" alt="…" />
q=auto works inside presets too. The analysis runs once per cache miss; once cached, subsequent requests serve the already-encoded bytes for free.
Placeholder: q=auto example

Smart cropping

When you set both w and h with fit=cover (the default), Convertly crops the source to your aspect ratio. gravity, crop, or fp controls where the crop happens. For focal-point workflows, entropy crops, and the /api/images/analyze endpoint, see Smart cropping & image analysis.
?w=600&h=600&fit=cover&gravity=auto       # libvips saliency (default — fast)
?w=600&h=600&fit=cover&gravity=smart      # content-aware smartcrop (slower, more accurate)
?w=600&h=600&fit=cover&crop=smart         # same as gravity=smart
?w=600&h=600&fit=cover&gravity=face       # face detection; falls through to smart, then saliency
?w=600&h=600&fit=cover&gravity=entropy    # high-entropy region (texture-heavy)
?w=600&h=600&fit=cover&gravity=center     # explicit center crop
?w=600&h=400&fit=cover&fp=0.3,0.4         # manual focal point — keeps this pixel framed
?w=600&h=400&fit=cover&fp=30%,40%         # same point as percentages

Pick a strategy

ModeWhat it doesCostWhen to use
gravity=auto (default)libvips attention strategy — saliency from saturation, skin tone, and edge density.Cheapest.Default; most portraits and product photography land correctly.
gravity=smart / crop=smartRuns the smartcrop algorithm: scores every candidate region for detail, saturation, and skin tone, then picks the highest aggregate score.One extra ~50–100ms pass on the cache miss.Hero images where the subject is off-centre, marketing imagery, anything where gravity=auto “almost” works.
gravity=faceReal face detection (TinyFaceDetector model). Picks the highest-confidence face as the crop centre. If no face is detected, falls through to gravity=smart, then to saliency.~50–200 ms once per cache miss when a face is detected.Portrait shots, team photos, marketing images that need to keep a person framed.
gravity=entropyPure entropy-based pick (no saliency cues).Cheapest.Detail textures, dense product flat-lays, anything with no obvious subject.
fp=x,yCentre the crop on a hand-picked normalised coordinate. Overrides gravity when both w and h are set.Cheapest — pure pixel math.When you already know where the subject is (CMS-stored focal point, art-directed hero) or when you’ve called /api/images/analyze once and want to reuse the result.
gravity=center / compassExplicit corner / edge crop.Cheapest.When the source is composed and you don’t want any smart behaviour.
fp=x,y is the most useful at scale: call /api/images/analyze once per upload, store the suggested focal point next to the file, then bake it into every <img> URL going forward. The CDN never re-runs analysis for those requests, so the only cost is the first analyse call. See Smart cropping → Combining focal points with the API for the full workflow.
Placeholder: original crop source
Placeholder: gravity auto
Placeholder: gravity smart
Placeholder: gravity face
Placeholder: gravity center

Fit strategies

fit controls how the source is shaped into the requested w/h box:
fitBehaviour
cover (default)Fills the box, cropping overflow. Pairs with gravity for smart cropping.
containFits inside the box, padding with transparency.
fillStretches to fill the box. Distorts the image — only useful for solid-color or texture sources.
insideScales down to fit the box without enlarging.
outsideScales to cover the box on the smallest axis.
Placeholder: fit cover
Placeholder: fit contain
Placeholder: fit fill
Placeholder: fit inside
Placeholder: fit outside

Canvas and presentation transforms

Use these when the CDN URL needs to produce finished UI assets, not just resized images:
?w=600&dpr=2
?w=900&rotate=6&bg=%23ffffff
?w=900&pad=32&bg=%23f8f3ff&border=8&borderColor=%239100ff&radius=36
?w=1200&watermark=<stored-file-id>&markW=160&markOpacity=0.72&markPosition=bottom-right&markPad=28
?w=900&watermark=<stored-file-id>&markScale=18&markRot=30&markTile=grid&markOpacity=0.35
dpr multiplies the output pixels while preserving the intended layout size in your markup. For example, render an image into a 400px CSS slot with w=400&dpr=2; the CDN returns an 800px asset for high-density displays. Watermarks must be image files stored in the same workspace as the delivery key. Convertly ignores missing or non-image watermark IDs instead of fetching arbitrary remote overlay URLs.
Placeholder: pad, border, and radius
Placeholder: watermark overlay
Tiled rotated watermark grid

Text overlay

Render text directly into the image — useful for OG cards, social previews, dynamic badges. Add text=… and the text composites on top of the resized image.
?w=1200&h=630&text=Hello+world&textSize=64&textColor=%23ffffff&textPosition=bottom-left&textBg=%23000000aa
ParamValueDefault
textURL-encoded text (max 120 chars).
textColorHex color (#fff, #ffffff, or with alpha #ffffff80).#ffffff
textSizeFont size in pixels (8–256).48
textPositiontop-left, top-center, top-right, center, bottom-left, bottom-center, bottom-right.bottom-center
textFontsans, serif, mono.sans
textBgOptional hex background pill behind the text.none
Common pattern — OG images for a blog post, varying only the title:
<meta property="og:image" content="https://cdn.convertly.sh/cvly_pub_.../{fileId}?preset=og-card&text=My+latest+post" />
Where og-card is a preset that sets the canvas (1200×630), font, and color — and only the text varies per page.
Placeholder: text overlay

Pixelation and face privacy

Use pixelate when you want a deliberate pixel-art or obscured full-image effect:
?w=900&pixelate=14
?w=900&px=24
Use blurFaces for privacy-safe previews, customer screenshots, testimonials, and UGC moderation flows:
?w=900&blurFaces=1
?w=900&blurFaces=true&faceBlur=48
If you want a more obvious privacy treatment, use face pixelation:
?w=900&pixelateFaces=1
?w=900&pixelateFaces=true&facePixelate=24
Face privacy runs after resize/crop/text overlay and before final encoding, so detected boxes line up with the delivered image. Face detection is best-effort: it can miss small, turned, heavily occluded, or low-resolution faces. For legal, medical, law-enforcement, or child-safety workflows, treat the output as an automated first pass and require review before publishing.
Placeholder: pixelate effect
Placeholder: blur faces

Explicit region privacy

Use output-pixel coordinates when you already know what should be hidden:
?w=900&blurRegion=120,320,220,80
?w=900&pixelateRegion=120,320,220,80&regionPixelate=18
?w=900&plateRegion=120,320,220,80
?w=900&regions=plate:120,320,220,80:44|blur:40,40,160,120:28
plateRegion is intentionally explicit in this release. Automatic license-plate detection needs a dedicated detection model and should be treated as a separate ML feature; coordinate-based plate privacy is reliable today and uses the same renderer path that automatic detection can call later.
Placeholder: blur region

Network-aware quality

If the visitor’s browser sends Save-Data: on (data-saver mode on iOS / Android / Chrome / Opera), Convertly automatically drops the encode quality by 15 points (floored at 40) to halve bandwidth on slow networks. You don’t need to do anything — the route picks it up, sets Vary: Save-Data, and caches both variants independently.

How caching works

Every URL is deterministic. The endpoint sets long-lived immutable cache headers and varies on Accept and Save-Data:
Cache-Control: public, max-age=31536000, immutable, stale-while-revalidate=86400
Vary: Accept, Save-Data
Put any CDN in front (Cloudflare, Vercel Edge, Fastly) and you’ll typically see a 90–99% cache hit ratio. Only the first uncached request per (file, params) tuple consumes a transform; repeats are served by the CDN with no origin call.

Realistic cache ratios

The 95% number is achievable, not guaranteed. A few honest factors:
  • Edge caches are per-PoP, not global. A globally popular image may fetch from Convertly once per PoP until warm. For regional audiences this is usually invisible. Convertly also persists popular transform variants so repeat requests worldwide often skip re-encoding.
  • LRU eviction. Edge caches evict less popular URLs under memory pressure. Long-tail content re-fetches more often than hot URLs.
  • Cache-busting URLs. Anything like ?v=${Date.now()} collapses the cache ratio to ~0%. Keep URLs deterministic: same params → same URL → same cached bytes.

What counts as a delivery

A delivery is any request that reaches Convertly’s origin. These do not count:
  • Repeat hits served by Cloudflare, Vercel Edge, Fastly, or any other CDN.
  • Browser cache hits.
  • Service worker cache hits.
The only requests that count: the first hit per (file, params) tuple at each CDN edge, plus any cache misses or evictions that re-fetch from origin afterward.