First request vs repeats
The first request for a new URL — a new file, width, or transform param — may take about one second while Convertly encodes that variant. Repeat requests for the same URL are typically ~20 ms from the global edge cache. In production, most traffic is cached; stablesrcset widths and presets keep first-hit requests rare.
Cache keys and immutability
Every CDN URL is a contract:Accept + Save-Data + Client Hints when used. That means:
- Changing
w,format, or any transform param creates a new cache entry (by design). - Reusing the same URL always hits the same bytes — ideal for
Cache-Control: immutablesemantics. - Do not overwrite files in place if you need instant updates; upload a new
fileIdor purge.
Prefer new file IDs over in-place overwrites
Format negotiation
Useformat=auto (SDK default) so modern browsers get AVIF/WebP and legacy clients get JPEG from one URL string. Convertly sets Vary: Accept — at most two encoded variants per transform URL.
See Format & delivery.
Responsive delivery
- Most sites:
<ConvertlyImage>orsrcset+sizes— see Responsive images. - Fluid layouts:
ch=Width,Dpr— see Client Hints guide. - Art direction:
<picture>with differentw/h/gravityper breakpoint.
dpr=2 with a fixed w — see Device pixel ratio).
Presets reduce mistakes
Named presets (hero, thumb, og-card) keep param sets consistent across teams and reduce accidental cache fragmentation from typos.
Purge strategy
Origin deliverability
Convertly fetches origin-backed URLs (/o/{slug}/…) over public HTTPS or private bucket credentials. If transforms fail or return errors, check the following.
Public HTTPS origins
Local dev: use Next.js
localPassthrough or point the origin at a preview deploy or HTTPS tunnel — see Image CDN setup and Operations → Local development.
Private bucket origins (S3, R2, GCS, Azure)
Examples for R2, GCS, and Azure.
Common error patterns
Smart crop cost
gravity=smart and gravity=face run analysis on cache miss only. Popular URLs pay once, then serve from edge indefinitely. For zero per-request analysis, persist focal points from POST /api/images/analyze and render with fp=x,y.
Security vs performance
publicnamespaces: fastest path — embed URLs directly in HTML.signed/privateendpoints: every URL needs server-side signing. Plan for sign API latency at render time, not per browser request, and cache signed URLs untilexpwhen appropriate.
Related docs
- Operations — purge, origins, security
- URL structure — namespaces, slugs, custom domains