You need to enable JavaScript to run this app.
Torch Object Storage

Torch Object Storage

Copy page
Download PDF
Image processing
Using image styles
Copy page
Download PDF
Using image styles
Once you have successfully created an image style, you can use it to process multiple images uniformly, thereby simplifying operations. This topic describes how to use an image style.​
Prerequisites​
You have created an image style. For instructions, see Creating image styles.​
Notes​
Creating image styles is free. However, processing images with these styles incurs data processing, request, and data transfer costs. The details are as follows:​
  • Data processing:​
  • Image processing: You are charged for resizing images, adding watermarks, and performing other basic processing operations. Costs are calculated based on the original image's actual size. For more information, see Data processing.​
  • Advanced image compression: This feature is billed separately based on the number of processing operations performed. You will only be charged fees when you use the advanced compression feature. If you use both resizing and advanced compression, you will need to pay for image processing, advanced compression, the number of requests, and data transfer. For more information, see Data processing.​
  • Requests: Processing an image generates one GetObject request, and fees are based on the number of requests. For more information, see Requests.​
  • Data transfer: You are charged for outbound traffic over the public network based on the size of the processed image. For more information, see Data transfer.​
Steps​
  1. Log in to the TOS console.​
  1. In the left navigation pane, click Buckets. In the Buckets list, click the bucket you want to manage.​
  1. Obtain the style name.​
  1. In the left navigation pane, select Data processing > Image processing.​
  1. On the Image processing page, click the style tab. Find the name of the desired style in the list.​
  1. Obtain the image URL.​
  • For illustration, we assume the image is placed in the first-level directory of the objects list.​
  1. In the left navigation pane, click Objects.​
  1. On the Objects page, click Details in the Actions column of the image.​
  1. In the Basic information pane, click the copy icon next to URL to obtain the image URL.​
  1. Use the style to process the image.​
  1. Open the image URL in your browser.​
  1. Append ?x-tos-process=style/<style name> to the image URL. This will get the image processed using that style.​
  • For example, if the image URL is https://tos-tools.tos-cn-beijing.volces.com/misc/sample.png and the style name is test, then the URL that you should enter to process the image is https://tos-tools.tos-cn-beijing.volces.com/misc/sample.png?x-tos-process=style/test.​
Related operations​
Instead of the image style parameter (?x-tos-process=style/), you may use a custom delimiter configured via the original image protection feature. Adding a suffix to the image filename simplifies the URL for style-based processing. Learn more in Original image protection.​
Last updated: 2025.09.25 17:06:43