Updated on 2026-11-24 GMT+08:00

Overview

Introduction

Image processing is a feature integrated in Object Storage Service (OBS). It provides stable, secure, efficient, and inexpensive image processing services. By using this feature, you can slim, crop, resize, and watermark images, as well as convert the formats of images.

You can access image processing through OBS Console or REST APIs. Image processing lets you easily process images stored in OBS, and you can obtain the processed images immediately. The time required for a single image processing request increases with the image size, resolution, and number of commands in the pipeline, up to 30 seconds.

Application Scenarios

Image processing enables you to resize, crop, or compress images in the cloud, without downloading bulky image-processing software to your local computer. It is suitable for scenarios such as social media, news portals, and shopping websites.

For example, you can add effects to or resize images in your cloud album anytime and anywhere, and quickly share the images with your friends online.

Shopping or other likewise websites where images are frequently accessed can use image processing to simply process the images and delivers them to Content Delivery Network (CDN) for acceleration. The processed images can then be faster downloaded from CDN.

Architecture

You can upload your images to OBS using OBS Console, OBS clients, REST APIs, or third-party clients. Before downloading and using an image, you can create an image style or pass image processing parameters to process it, such as cropping and compressing the image. After processing, you can obtain the URL of the new image. Furthermore, you can deliver the new image to CDN for acceleration and directly download it from CDN when needed. Figure 1 shows the flowchart of image processing.

Figure 1 Image processing flowchart

After processing, new images will be directly displayed in a browser and are not stored in OBS, so they do not incur any storage costs.

Permission Description

To use image processing, your account must have the Tenant Administrator permission.

Billing

For details, see How Is Image Processing Billed?

Prerequisites

Ways to Use Image Processing

You can access image processing in either of the following ways:

  • Using OBS Console

    On the image processing page, you can create a processing style for an image by specifying parameters on the GUI or by editing code. You can then view the new image effect on the Preview Image tab page on the image's details page. You can also click Copy Link to get the link for accessing the new image.

    To get started with image processing on OBS Console, see Using Image Processing on OBS Console.

  • Using the REST API

    You can call OBS Representational State Transfer (REST) APIs to access image processing. In the REST architectural style, the network is viewed as a set of resources. Resources on the network are identified by Uniform Resource Identifiers (URIs), and client applications locate resources using Uniform Resource Locators (URLs). The URL is in the https://Endpoint/uri format. By putting a URL that complies with the command rules of image processing in a browser, you can get the new image after processing. For more information, see the Object Storage Service API Reference.

    To get started with image processing with API, see Using Image Processing with APIs.

Image Processing Functions

Table 1 describes what you can do on images stored in OBS by using image processing.

Table 1 Image processing functions

Function

Description

Usage

Getting Information About an Image

Returns an image's basic information, including the format, size, and average color value.

API calls

Setting Image Effects

Adjusts an image's effects, including the brightness, contrast, sharpness, and blur.

OBS Console GUI

OBS Console code editor

API calls

Resizing Images

Resizes images based on a specified width, height, or percentage.

OBS Console code editor

API calls

Watermarking Images

Adds a text watermark, an image watermark, or both of them to a specific position of an image. Text watermarks can have a color, font, and size configured, and image watermarks can be resized, rotated, or cropped before being added to images.

OBS Console GUI

OBS Console code editor

API calls

Converting Formats and Interlacing Images

Converts images to various formats, and supports interlaced rendered images after conversion.

OBS Console GUI

OBS Console code editor

API calls

Rotating Images

Rotates images clockwise, and automatically rotates images based on the recorded rotation information of cameras or smartphones.

OBS Console code editor

API calls

Cropping Images

Crops images based on the specified width, height, radius of the inscribed circle, index, and radius of rounded corners.

OBS Console code editor

API calls

Changing Image Quality

Compresses JPG images based on the relative quality and absolute quality.

OBS Console code editor

API calls

Slimming Images

Reduces the image size without compromising its quality.

OBS Console code editor

API calls

Image Processing Persistency

Synchronously stores images after processing in a specified OBS bucket for you to directly access the processed images.

OBS Console code editor

API calls

Access with Commands

Orchestrates multiple process commands in sequence. With this function, you can add multiple process commands to the URL of the image that you want to process, and separate each command using the designated delimiter. Then the commands are executed one by one from left to right.

OBS Console code editor

API calls

Step 3: Creating an Image Style

Customizes image styles for you to batch process images that require the same processing operations.

OBS Console GUI

OBS Console code editor

  • OBS Console GUI: Create an image style by selecting the effects you want on the console.
  • OBS Console code editor: Create an image style by entering code for the effects on the console.