All Products
Search
Document Center

Object Storage Service:Image Processing

Last Updated:Mar 26, 2026

You can process images stored in Object Storage Service (OSS) by adding processing parameters to a GetObject request. For example, you can perform operations such as adding watermarks or converting formats.

Processing parameters

You can process images stored in Object Storage Service (OSS) using one or more parameters, or encapsulate multiple parameters in an image style to process them in batches. For more information about image styles, see Image styles.

If you specify multiple processing parameters, OSS applies them in the order provided. The following table describes the processing parameters.

Actions

Parameter

Description

Resizing

resize

Resizes an image to the specified dimensions.

Watermarking

watermark

Adds an image or text watermark to an image.

Custom cropping

crop

Crops an image into a rectangle with the specified dimensions.

Quality adjustment

quality

Adjusts the quality of images in JPG and WebP formats.

Format conversion

format

Converts the image format.

Advanced compression for HEIF or AVIF images

format

Converts an image to the HEIF or AVIF format, which provides a high compression ratio.

Image information query

info

Retrieves image information, including basic and EXIF data.

Auto orientation

auto-orient

Automatically rotates an image based on its orientation parameter.

Circle crop

circle

Crops a circular area of a specified size from the image's center.

Indexed slice

indexcrop

Slices an image into sections of a specified size along the x- or y-axis and returns one section.

Rounded rectangle

rounded-corners

Crops an image into a rounded rectangle with the specified corner radius.

Blur

blur

Blurs an image.

Rotation

rotate

Rotates an image clockwise by the specified angle.

Gradual display

interlace

Enables progressive display for a JPG image.

Average hue query

average-hue

Retrieves the average hue of an image.

Brightness adjustment

bright

Adjusts the brightness of an image.

Sharpening

sharpen

Sharpens an image.

Contrast adjustment

contrast

Adjusts the contrast of an image.

For example, after you add the image resizing resize and quality transformation quality parameters to the source image example.jpg, the file URL is https://oss-console-img-demo-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/example.jpg?x-oss-process=image/resize,w_300/quality,q_90. You can configure different rules to have Alibaba Cloud CDN retrieve either the source image or the processed image during back-to-origin.

  • Fetch the source image

    After you enable parameter filtering on Alibaba Cloud CDN, all parameters after the question mark (?) are removed from file URL requests, allowing the request to directly hit the source image example.jpg.

  • Fetch the processed image

    Enable parameter retention in Alibaba Cloud CDN to keep all parameters after the question mark (?) in the request URL. The back-to-origin request then fetches the processed image.

For more information about how to configure back-to-origin rules for Alibaba Cloud CDN, see Ignore parameters.

Image processing methods

You can process images using object URLs, API operations, or SDKs. For more information, see Image processing methods.

Limitations

Parameter

Description

Image formats

  • The source image must be in one of the following formats: JPG, PNG, BMP, GIF, WebP, TIFF, HEIC, or AVIF.

  • For dynamic images, such as GIFs, only resizing, cropping, rotation, and watermarking operations are supported.

  • To encode or decode dynamic WebP images, submit a ticket to enable this feature.

Image size

The source image cannot exceed 20 MB in size.

Image width and height

The maximum width or height of the source image is 4,096 px for rotation. For all other operations, the maximum is 30,000 px, and the total number of pixels cannot exceed 250 million.

The total number of pixels for a dynamic image, such as a GIF image, is calculated as width * height * number of frames. The total number of pixels for a static image, such as a PNG image, is calculated as width * height.

Note

When you convert an image to the WebP format, both the width and height of the source image must not exceed 16,383 px. Otherwise, the conversion fails.

Image compression

After resizing, the width or height of the output image cannot exceed 16,384 px, and the total number of pixels cannot exceed 16,777,216.

Advanced image compression

After resizing, the dimensions of a HEIC image cannot exceed 4,096 × 4,096 px, and the dimensions of an AVIF image cannot exceed 4,096 × 2,304 px.

Image styles

You can create a maximum of 50 image styles per bucket. If your business requires more styles, submit a ticket.

Note

You can include multiple processing parameters in a single image style to perform complex image transformations. For more information, see Image styles.

Processing capability

  • Throughput (by source image size)

    • China (Hangzhou), China (Shanghai), China (Beijing), China (Zhangjiakou), and China (Shenzhen): 20 MB/s.

    • Other regions: 2 MB/s.

  • queries per second (QPS)

    • China (Hangzhou), China (Shanghai), China (Beijing), China (Zhangjiakou), and China (Shenzhen): 50.

    • Other regions: 5.

Note

For computationally intensive scenarios, such as encoding WebP, AVIF, or HEIF images at resolutions higher than 1080p, or if you need to exceed these limits, contact technical support to evaluate your specific usage requirements.

Billing

The following fees apply to the Image Processing (IMG) service:

  • Request fees

    Each image processing operation generates one GetObject request, and billing is based on the total number of requests. For more information, see Request fees.

  • Traffic fees

    You are charged for outbound traffic over the internet based on the size of the processed images. For more information, see Traffic fees.

Versions

Image Processing (IMG) provides two API versions. This topic describes the new API version. The old API version is no longer updated. For more information about the compatibility between the two versions, see Differences between the old and new versions of IMG.