Image Optimizer

Errors

Every error response is JSON with a stable, machine-readable shape:

{
  "error": "Unsupported format: gif",
  "code": "UNSUPPORTED_FORMAT"
}

Responses are sent with Cache-Control: no-cache, no-store, must-revalidate so intermediaries never cache a failure.

Error codes

CodeHTTP statusMeaning
EMPTY_URL400No source URL was provided after /img/.
UNSUPPORTED_FORMAT400f/format was not one of auto, webp, avif.
UNSUPPORTED_CONTENT_TYPE400The origin responded with a non-image Content-Type.
IMAGE_NOT_FOUND404The origin returned 404 for the source URL.
SIZE_EXCEEDED413The source image exceeds the configured size limit.
CIRCUIT_BREAKER_OPEN503Too many recent failures fetching this origin; requests are temporarily short-circuited.
UPSTREAM_TIMEOUT504The origin did not respond in time.
INVALID_FIT_MODE400fit was not one of the supported values.
INVALID_POSITION400position/pos was not one of the supported values.
INVALID_BLUR400blur was outside the 1–100 range.
INVALID_ROTATION400rotate/rot was not 0, 90, 180, or 270.