Image processing lets you set one edge (width or height) of an image to a specific length and scale the other edge proportionally.
Parameters
Name | Description | Value range |
w | The width of the target thumbnail. | 1 to 4096 |
h | The height of the target thumbnail. | 1 to 4096 |
l | Specifies whether to process the image if the target thumbnail is larger than the source image. |
|
Notes
The area of the target thumbnail cannot exceed 4096 × 4096 pixels. The length of a single edge cannot exceed 4096 × 4 pixels.
If you specify only the width or height, the source image is converted to the JPG format by default. Images in PNG, WebP, or BMP format may be distorted. For more information, see Quality transformation and Format conversion.
Examples
Resize an image to a height of 100, with the width scaled proportionally.
https://oss-console-img-demo-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/example.jpg@100h

Resize an image to a width of 100, with the height scaled proportionally.
https://oss-console-img-demo-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/example.jpg@100w

Resize an image to a width of 500, with the height scaled proportionally. The image is not enlarged if the target thumbnail is larger than the source image.
https://oss-console-img-demo-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/example.jpg@500w_1l
