All Products
Search
Document Center

Object Storage Service:Image processing (IMG)

Last Updated:May 27, 2026

Add IMG parameters to GetObject requests to process images stored in OSS. You can resize, crop, watermark, convert formats, and more.

IMG parameters

Process images with one or more parameters, or group parameters into a style for batch processing. Image styles.

When you specify multiple IMG parameters, OSS processes the image in the specified order.

Actions

Parameter

Description

Image resizing

resize

Resizes the image to specified dimensions.

Watermarking

watermark

Adds an image or text watermark to the image.

Custom cropping

crop

Crops the image into a rectangle of a specified size.

Quality adjustment

quality

Adjusts the quality of JPG and WebP images.

Format conversion

format

Converts the image format.

Advanced compression for HEIF or AVIF images

format

Converts the image to a high-compression format, such as HEIF or AVIF.

Query image information

info

Retrieves image information, such as basic properties and Exchangeable Image File Format (EXIF) data.

Auto orientation

auto-orient

Automatically rotates an image based on its orientation metadata.

Circular crop

circle

Crops a circular image of a specified size, centered on the original image.

Indexed slice

indexcrop

Slices the image into sections along the x-axis or y-axis and selects one of the slices.

Rounded rectangle

rounded-corners

Crops the image into a rectangle with rounded corners of a specified radius.

Blur

blur

Applies a blur effect to the image.

Rotation

rotate

Rotates the image clockwise by a specified angle.

Set display mode

interlace

Enables progressive rendering for an image in JPG format.

Get average hue

average-hue

Retrieves the average hue of the image.

Brightness

bright

Adjusts the brightness of the image.

Sharpen

sharpen

Applies a sharpening effect to the image.

Contrast

contrast

Adjusts the contrast of the image.

For example, adding resize and quality parameters to example.jpg produces the URL 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 CDN to retrieve either the source or processed image during back-to-origin requests.

  • Back-to-origin for the source image

    With parameter filtering enabled, CDN strips all parameters after the question mark (?) and fetches the source image example.jpg.

  • Back-to-origin for the processed image

    With parameter preservation, CDN retains the URL parameters and fetches the processed image.

Configure CDN back-to-origin rules with Ignore parameters.

IMG methods

Process images using object URLs, API operations, or SDKs. Image processing methods.

Limitations

Item

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 animated GIFs, only resizing, cropping, rotation, and watermarking are supported.

  • To encode or decode animated WebP images, submit a ticket.

Image size

Maximum source image size: 20 MB.

Source image dimensions

Rotation: maximum width or height is 4,096 px. Other operations: maximum width or height is 30,000 px, with a total pixel limit of 250 million.

The total number of pixels for dynamic images, such as GIF images, is width * height * number of frames, while for static images, such as PNG images, it is width * height.

Target image dimensions

  • For WebP images, the width and height cannot exceed 16,383 px.

  • For HEIC images, the width and height cannot exceed 4,096 px.

  • For AVIF images, the width cannot exceed 4,096 px, and the total number of pixels cannot exceed 9,437,184.

Image resizing

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

Image styles

Maximum: 50 image styles per bucket. To request more, submit a ticket.

Note

A single image style can include multiple IMG parameters for complex operations. Image styles.

Processing capacity

  • Image processing throughput per second (based on 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 (encoding WebP, AVIF, or HEIF above 1080p) or workloads exceeding these limits, contact technical support to evaluate limits for your use case.

Billing

IMG incurs the following fees:

  • Request fees

    Each operation generates one GetObject request, incurring a per-request fee. Request fees.

  • Traffic fees

    Outbound traffic fees are based on processed image size. Traffic fees.

IMG versions

IMG has both a new and old API version. This document covers the new version; the old version is no longer updated. New and old versions of IMG and their compatibility.