Skip to content

TRANSFORM_WIDTHS

const TRANSFORM_WIDTHS: readonly [96, 128, 160, 240, 256, 320, 400, 480, 600, 640, 800, 960, 1080, 1200, 1280, 1440, 1600, 1920, 2560, 3840];

Defined in: packages/asset-client/src/transform.ts:31

Widths the CDN edge whitelists (DoS guard — see apps/cdn-proxy WHITELIST_WIDTHS). Requesting any OTHER width returns HTTP 400 at the edge (unsigned URLs). These are the 1× base ladder values; DPR ×2/×3 multiples are applied + whitelisted server-side. Import this instead of hardcoding magic widths so an unsupported size is caught in review/IDE.