All Products
Search
Document Center

Object Storage Service:Styles

Last Updated:Jun 03, 2026

Bundle multiple processing parameters into a reusable style to simplify media, document, or image processing.

Note

Data processing APIs and SDKs are available in regions with Intelligent Media Management (IMM) endpoints.

Use custom styles

Create a style

Note

A bucket supports up to 50 styles, which apply only to files in that bucket. To request more styles, contact technical support.

  1. Log on to the OSS console.

  2. In the left-side navigation pane, click Buckets, and then click the name of the destination bucket.

  3. In the left-side navigation pane, choose Data Processing.

  4. Based on your file type, choose IMG, Document Processing, or Media Processing.

  5. Select the Style Management tab, and then click Create Style.

  6. In the Create Style panel, configure the style.

  7. Click OK.

Use a style

Use a style to process files through an object URL (synchronous) or an asynchronous request.

Synchronous processing with an object URL

To process an object synchronously, append the style to its URL: http(s)://BucketName.Endpoint/ObjectName?x-oss-process=style/StyleName. The following table describes the parameters.

Parameter

Description

Example

http(s)://BucketName.Endpoint/ObjectName

The object URL. Obtain URLs for one or more files.

https://oss-console-img-demo-cn-hangzhou-3az.oss-cn-hangzhou.aliyuncs.com/example.jpg?x-oss-process=style/small

x-oss-process=style/

Fixed prefix for style-based processing.

StyleName

The name of the custom style.

Simplify the URL with a custom separator and a custom domain name:

  • Use the separator ! to replace x-oss-process=style/.

  • Map a custom domain name to the bucket to further simplify the URL.

For example, if you map the custom domain name example.com to the bucket, you can use https://example.com/example.jpg!small to process the image.

Note

Since October 9, 2022 (UTC+8), online preview is disabled for new buckets without a mapped custom domain. Official announcement.

Asynchronous processing with a style

Use x-oss-async-process=style/StyleName to asynchronously process a file:

POST /ObjectName?x-oss-async-process HTTP/1.1
Host: video-demo.oss-cn-hangzhou.aliyuncs.com
Date: Fri, 28 Oct 2022 06:40:10 GMT
Authorization: OSS4-HMAC-SHA256 Credential=LTAI********************/20250417/cn-hangzhou/oss/aliyun_v4_request,Signature=a7c3554c729d71929e0b84489addee6b2e8d5cb48595adfc51868c299c0c218e
 
 // Asynchronously process the file example.avi with the StyleName style and save the output to oss://outbucket/outobjprefix.mp4.
x-oss-async-process=style/StyleName|sys/saveas,b_b3V0YnVja2V0,o_b3V0b2JqcHJlZml4LnthdXRvZXh0fQ

The following table describes the parameters.

Parameter

Description

ObjectName

The name of the object.

x-oss-async-process=style/

Fixed prefix for style-based processing.

StyleName

The name of the custom style.

Use built-in styles

OSS also provides built-in styles for file processing.

Asynchronous processing with a style

Use x-oss-async-process=style/::systemStyleName to asynchronously process a file with a built-in style:

POST /ObjectName?x-oss-async-process HTTP/1.1
Host: video-demo.oss-cn-hangzhou.aliyuncs.com
Date: Fri, 28 Oct 2022 06:40:10 GMT
Authorization: OSS4-HMAC-SHA256 Credential=LTAI********************/20250417/cn-hangzhou/oss/aliyun_v4_request,Signature=a7c3554c729d71929e0b84489addee6b2e8d5cb48595adfc51868c299c0c218e
 
// Asynchronously process the file example.avi with the built-in style h264-mp4-1080p and save the output to oss://outbucket/outobjprefix.mp4.
x-oss-async-process=style/::h264-mp4-1080p|sys/saveas,b_b3V0YnVja2V0,o_b3V0b2JqcHJlZml4LnthdXRvZXh0fQ

The following table describes the parameters.

Parameter

Description

ObjectName

The name of the object.

x-oss-async-process=style/

Fixed prefix for style-based processing.

:: 

Prefix for a built-in style.

systemStyleName

The built-in style name.

Note

You can view all supported built-in style parameters on the Data Processing>Media Processing page.

Import styles between buckets

Note

This feature supports only IMG styles.

Export styles from a source bucket and import them into a destination bucket to reuse the same image processing styles.

  1. Export the styles from the source bucket.

    1. On the management page of the source bucket, choose Data Processing>IMG.

    2. On the IMG page, click Export Style.

    3. In the dialog box that appears, select a location to save the style file, and then click Save.

  2. Import the styles into the destination bucket.

    1. On the management page of the destination bucket, choose Data Processing>IMG.

    2. On the IMG page, click Import Style.

    3. In the dialog box that appears, select the exported style file, and then click Open.

      The imported styles are now available for processing image files in the destination bucket.

References