Skip to main content
POST
/
utils
/
media
/
images
/
optimize
Error
A valid request URL is required to generate request examples
{
  "success": true,
  "data": {
    "url": "<string>",
    "original_size_kb": 123,
    "optimized_size_kb": 123,
    "savings_percent": 123,
    "width": 123,
    "height": 123,
    "format": "<string>",
    "activity_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  }
}

Authorizations

Authorization
string
header
required

Enter token in format (Bearer )

Body

multipart/form-data
image
file

The image file

url
string<uri>

Alternative: URL of image

max_width
integer

Maximum width

Example:

2000

target_format
enum<string>
Available options:
jpg,
png,
webp,
avif
Example:

"webp"

quality
integer
Required range: 1 <= x <= 100
Example:

85

keep_forever
boolean
Example:

false

Response

200 - application/json

Image optimized successfully

success
boolean
Example:

true

data
object