Image tools

Resize and convert a picture

Returns the picture itself, turned upright from its EXIF orientation, without metadata. fit=inside keeps the whole picture within width and height and never enlarges it; cover fills the box and crops the middle; fill stretches. Options go in the query string, or as form fields when the file is sent as multipart/form-data.

post/v1/image/convert

Request

  • Base URL: https://api.dharun.dev
  • URL: https://api.dharun.dev/v1/image/convert
  • Auth: none declared

Query parameters

format'jpeg' | 'png' | 'webp' | 'avif' | 'gif' | 'tiff'

Output format. Default webp.

widthinteger

Width in pixels, 1 to 8000.

heightinteger

Height in pixels, 1 to 8000.

fit'inside' | 'cover' | 'fill'

How the picture fits width and height. Default inside.

qualityinteger

JPEG, WebP and AVIF quality, 1 to 100. Default 80.

Response

Success

Changes

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