Image

Resize an image

Resize an image to width and/or height with a fit mode (cover, contain, fill, inside, outside). Returns the image bytes (default) or JSON with base64.

post/image/resize

Request

  • Base URL: https://abundanceapis.com
  • URL: https://abundanceapis.com/image/resize
  • 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)

widthinteger
heightinteger
fit'cover' | 'contain' | 'fill' | 'inside' | 'outside'

Example request

{
  "url": "https://picsum.photos/800",
  "width": 400,
  "height": 400
}

Changes

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