Skip to main content
POST
Optimize Asset
Optimize an image asset by converting format, adjusting quality, or resizing.

Path Parameters

string
required
Organization ID
string
required
Project ID
string
required
Component ID
string
required
Asset ID

Request Body

object
required
Optimization options (at least one property required)
number
Image quality (1-100)
string
Output format: jpeg, png, webp, or avif
number
Target width in pixels (1-10000)
number
Target height in pixels (1-10000)

Example Request

Response

Returns the new, optimized Component Asset object.
Optimization creates a new asset with a new ID, named <base>_optimized.<ext> (for example, hero-image_optimized.webp). The original asset is not changed; its ID is stored in the new asset’s metadata.originalAssetId.

Error Responses

Unsupported Format

Asset In Use

Code Examples