Manage and Operate OSS – Image Processing

OSS Image Processing

This topic describes how to process image objects stored in Service (OSS) by using object URLs, OSS SDKs, or API operations.

Image Guide

This topic describes how to use Image Processing (IMG). You can use any of the following methods to process an image: add parameters to the image , use an image style to process various images, and use OSS SDKs.

YouTube player

Add parameters to an image URL

To process an image, add the corresponding parameters to the end of the image URL.

  1. Log on to the OSS console.
  2. Click the target bucket.
  • New console: Click Buckets, and then click the name of the target bucket.
  • Old console: In the left-side navigation pane, click the name of the target bucket.

3. Click the Files tab. On the Files tab that appears, click the name of the target object.

4. In the View Details dialog box that appears, click Open File URL. The image is opened in the browser.

5. In the address bar of the browser, add IMG parameters to the end of the URL in the following format:

The URL format is described as follows:

  • x-oss-process=image: used to introduce subsequent IMG parameters. The question mark (?) is used between x-oss-process and the original image URL. The forward slash (/) is used between image and IMG parameters.
  • action: the name of the parameter for the operation on the image. Multiple parameters are connected by a forward slash (/). Operations are performed in sequence.
  • parame: the parameter value for the operation on the image.

For example, to rotate the test.jpg image in bucket1 90 degrees clockwise and proportionally scale the image down to 50% of its original size, add IMG parameters to the URL in the following format: https://bucket1.oss-cn-hangzhou.aliyuncs.com/test.jpg?x-oss-process=image/rotate,90/resize,p_50.

https://bucket1.oss-cn-hangzhou.aliyuncs.com/test.jpg is the original image URL. rotate specifies the rotate operation on the image and resize the resize operation on the image. 90 indicates the value of the rotate parameter. p_50 indicates the value of the resize parameter.

Read More: https://www.alibabacloud.com/help/doc-detail/44686.htm

Print Friendly, PDF & Email

Related posts:

Random posts:

%d bloggers like this: