Alibaba Cloud Content Delivery Network (CDN) allows you to resize images. This topic describes how to resize images and provides examples.
Note Image editing is a paid service. It is currently free of charge until further notice.
Set the action to
The following table describes the parameters.
Note If one of the preceding parameters is set to a negative value, the image remains in its original size.
|w||Specifies the width to which the image is to be resized.||The default value is 0. The total pixels of the image cannot exceed 16,777,216 pixels.|
|h||Specifies the height to which the image is to be resized.|
|l||Specifies the length of the longer side to which the image is to be resized.|
|s||Specifies the length of the shorter side to which the image is to be resized.|
|fw and fh||Specifies the width and height to which the image is to be resized.|
|p||Specifies that the image is resized based on a specific aspect ratio of the original image size.||[0,100]|
The following table describes how to resize images.
|Based on a specific aspect ratio||Resize an image based on a specific aspect ratio of the original image size.||
|Based on conditions||Resize an image only when the image is equal to or larger than 1,024,000 bytes. Unit: bytes.
Note The threshold of 1,024,000 bytes is used as an example. You can set the threshold based on your business requirements.
|Based on the longer side||Resize an image based on the specified length of the longer side.||
|Based on the shorter side.||Resize an image based on the specified length of the shorter side.||
|Based on the width||Resize an image based on the specified width.||
|Based on the height||Resize an image based on the specified height.||
|Based on the specified height and width||Resize an image based on the specified width and height.||