The advanced image compression feature provided by Object Storage Service (OSS) allows you to efficiently convert the formats of images to HEIF or AVIF with a high compression ratio.
Prerequisites
The advanced image compression feature is supported only in the China (Zhangjiakou), China (Shanghai), China (Hangzhou), China (Shenzhen), China (Beijing), Singapore, and US (Virginia) regions.
Background information
With the improvement of camera device resolution and service display requirements, the image processing (IMG) feature needs to support images in more flexible and higher compression rate formats, such as HEIF and AVIF. However, the traditional image coding and decoding technology has low efficiency in processing images in these formats and cannot meet the real-time requirements of business. To meet these requirements, OSS provides the advanced image compression feature to efficiently convert the format of images to HEIF or AVIF which have a higher compression rate.
Parameter description
If you set the output format of an image to HEIF or AVIF by using the format
parameter, OSS automatically uses the advanced image compression feature.
Valid value | Description |
heic | Converts the format of the source image to HEIF. |
avif | Convert the format of the source image to AVIF. |
Examples
Convert the format of the source JPEG image to HEIF.
The URL used to process the source image: https://image-demo-oss-zhangjiakou.oss-cn-zhangjiakou.aliyuncs.com/pics/compression-demo.jpeg?x-oss-process=image/format,heic.
Convert the format of the source JPEG image to HEIF and resize the image to 923 × 600.
The URL used to process the source image: https://image-demo-oss-zhangjiakou.oss-cn-zhangjiakou.aliyuncs.com/pics/compression-demo.jpeg?x-oss-process=image/resize,l_923,h_600/format,heic.
The following table describes the size of the JPEG source image and HEIF images at different resolutions after format conversion. The HEIF images have ultra-high compression ratio compared with the JPEG image, which can effectively save costs.
Format | Resolution | Size |
JPEG (source image format) | 3924 × 2550 | 2.09 MB |
HEIF | 3924 × 2550 | 268 KB (compression ratio: 87.5%) |
HEIF | 923 × 600 | 30.7 KB (compression ratio: 98.6%) |