Image

Compress an image

Re-encode an image at a target quality to shrink its size. Defaults to WebP for the best compression; pass format to keep or choose another.

post/image/compress

Request

  • Base URL: https://abundanceapis.com
  • URL: https://abundanceapis.com/image/compress
  • Auth: none declared

Request body

urlstring

Public image URL

base64string

Base64-encoded image (data URI ok)

output'binary' | 'base64'

Return the image bytes or JSON with base64

format'jpeg' | 'png' | 'webp' | 'avif'

Output format (default: keep input)

qualityinteger

Output quality (lossy formats)

Example request

{
  "url": "https://picsum.photos/800"
}

Changes

No recorded changes to this operation across all 1 revision of this API.