Adjust image quality

更新时间: 2026-04-01 02:33:10

Reduce image file sizes and lower transfer costs by adjusting image quality through Alibaba Cloud CDN's image editing feature. Quality adjustment supports two methods: automatic compression, and URL-based quality parameters.

Note

The image editing feature of Alibaba Cloud CDN, the image editing feature of Dynamic Content Delivery Network (DCDN), and the Image Processing (IMG) feature of Object Storage Service (OSS) are three separate features and cannot be used interchangeably.

Note

Image editing is a paid service and is free of charge until further notice.

Automatic compression

Automatic compression reduces file size without changing image dimensions or format. For setup instructions, see Enable and use image editing.

Quality parameters

Quality transformation applies only to JPG and WebP images. Set the action to quality and use one of the following parameters.

Parameter reference

ParameterDescriptionValid values
QAbsolute quality value. Sets a quality ceiling — output quality is whichever is lower: the target value or the original quality. Quality can only be lowered, not raised.Multiples of 5 in the range 0–100 (other values are not supported). Higher values produce better quality and sharpness. 95 is recommended.
qQuality coefficient. Multiplies the original quality by the specified percentage to calculate the output quality.Multiples of 5 in the range 0–100 (other values are not supported). Higher values produce better quality and sharpness. 95 is recommended.

Examples

Absolute quality (`Q`)

http(s)://example.com/image01.png?image_process=quality,Q_90

Q sets a quality ceiling. If the original quality is already below the target value, the original quality is kept.

Original qualityTarget (Q_90)Output quality
959090 (reduced to target)
809080 (original kept — cannot increase)

Quality coefficient (`q`)

http(s)://example.com/image01.png?image_process=quality,q_90

q scales quality relative to the original. The output quality equals the original quality multiplied by the coefficient.

Original qualityCoefficient (q_90)Output quality
8090%80 × 90% = 72

What's next

上一篇: Format conversion 下一篇: Crop images
阿里云首页 CDN 相关技术圈