All Products
Search
Document Center

Edge Security Acceleration:Resize images

Last Updated:Jun 17, 2026

You can resize images by percentage, by condition, adaptively, or to a specific size. This is useful when a platform or application requires specific image dimensions, such as for profile pictures or thumbnails.

Parameters

image_process=resize

The following table lists the supported parameters.

Note
  • If any parameter is set to a negative value, the original image is returned without processing.

  • Only downsizing is supported. If the specified dimensions exceed the original size, the original image is returned.

Parameter

Description

Value range

w

The target width of the image.

Default value: 0. The total pixel count of the image cannot exceed 16,777,216.

h

The target height of the image.

l

The target length of the longer side of the image.

s

The target length of the shorter side of the image.

fw and fh

The target width and height of the image.

p

The percentage by which the image is proportionally resized.

[0,100]

Examples

The following table provides image resizing examples.

Method

Operation

Example

Based on a specific aspect ratio

Resize an image proportionally.

example.com/image01.png?image_process=resize,p_80

Based on conditions

Resize an image only if the file size is at least 1,024,000 bytes.

Note: The threshold of 1,024,000 in this example is customizable based on your requirements.

example.com/image01.png?image_process=resize,l_200/threshold,1024000

Based on the longer side

Resize an image by specifying the longer side length.

example.com/image01.png?image_process=resize,l_200

Based on the shorter side

Resize an image by specifying the shorter side length.

example.com/image01.png?image_process=resize,s_200

Based on the width

Resize an image by specifying the width.

example.com/image01.png?image_process=resize,w_200

Based on the height

Resize an image by specifying the height.

example.com/image01.png?image_process=resize,h_200

Based on the specified height and width

Resize an image by specifying both the width and height.

example.com/image01.png?image_process=resize,fw_200,fh_200