Image Compression
Updated at:2025-11-03
Overview
Image compression is an essential way to save storage space and enhance image loading speed. BOS’s image compression feature allows conversion to Webp, HEIC, or AVIF formats to reduce file size and improve accessibility.
Parameter description
Action name: format
| Parameters | Value | Description |
|---|---|---|
| f | webp、heic 、avif | Specify the target image format |
Usage example
- The original image is in JPEG format with a size of 62 KB, as shown below.

- Convert JPEG-format images to the WEBP format.
https://doc.bce.baidu.com/bce-documentation/BOS/image.jpg?x-bce-process=image/format,f_webp - Convert JPEG-format images to the HEIC format.
https://doc.bce.baidu.com/bce-documentation/BOS/image.jpg?x-bce-process=image/format,f_heic - Compression rate comparison
| Format | Image size |
|---|---|
| jpg | 62.02KB |
| webp | 14.77 KB (compression rate: 76.19%) |
| heic | 4.30 KB (compression rate: 93.07%) |
