Updated on 2024-02-29 GMT+08:00

Creating Image Styles

Context

By creating image styles, you can process the image such as cropping, compressing, and watermarking. Each image style specifies a set of process operations. For images require the same process operations, you can create an image style to batch process them. Once a style is successfully created, it can be used by multiple images in the bucket.

When creating styles, you can view the style effects of the sample image on the right.

When using REST APIs to access image processing, you can call the style name in the URL to avoid entering complex commands. For details about the domain name rules for API access, see Style Access Method.

You can create a maximum of 100 styles for one bucket at one time.

You can create image processing styles or replicate existing image processing styles from another bucket.

Creating an Image Processing Style

  1. On the console homepage, click Service List in the upper left corner and choose Storage > Object Storage Service.
  2. Click a desired bucket name. In the navigation pane, choose Image Processing.
  3. Click Create. The style editing page is displayed.
  4. On the editing page, you can edit the style name and basic properties. You can also set the resize mode, as well as perform operations like rotation/cropping, watermarking, and image output.

    • Style Name

      Input an easy-to-remember style name. Only letters (uppercase and lowercase), digits, periods (.), underlines (_), and hyphens (-) are allowed. The style name contains 1 to 256 characters, for example, rotate_0001.

    • Edit Mode

      You can either choose GUI mode for visible editing, or choose Code mode.

      An example code is as follows:

      image/sharpen,100/blur,r_1,s_1/resize,m_lfit,h_400,w_400,limit_1
    • Parameter settings

      You can set image effects, resizing, watermarks, and output parameter values.

  5. After finishing editing the image style, click OK to save the style. The new style will be displayed in the style list.