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

Torch Object Storage

Copy page
Download PDF
Image processing
ImageSlim
Copy page
Download PDF
ImageSlim
Description​
This interface intelligently compresses images.​
Compatibility​
  • Confirm image processing restrictions before using this interface. For details, see Usage Restrictions.​
  • Currently supports only jpg/png image formats.​
Request syntax​
​
GET /<ObjectKey>?x-tos-process=image/slim,zlevel_<value> HTTP/1.1​
Host: examplebucket-1250000000.vol.com​
Date: Wed, 28 Oct 2015 20:32:00 GMT​
Authorization:​
Content-Length: 64​
​
[Object]​
​
Request parameters and headers ​
For common request headers, see Common Parameters.​
​
Field name​
Location​
Type​
Required​
Example value​
Description​
x-tos-process​
Query​
String​
Yes​
image/slim​
Data processing type, values can be image or slim.​
​
Request body elements​
​
Field name​
Type​
Required​
Example value​
Description​
​
zlevel​
Query​
int​
No​
3​
Compression level, ranging from 1 to 9. A higher value indicates a higher compression level; the default is 3.​
​
Response headers​
The response contains common headers. For more information, see Common Parameters.​
Response body elements​
Returns result image content.​
Sample request​
​
GET /<ObjectKey>?x-tos-process=image/slim,zlevel_<value> HTTP/1.1​
Host: examplebucket-1250000000.vol.com​
Date: Wed, 28 Oct 2015 20:32:00 GMT​
Authorization:​
Content-Length: 64​
​
[Object]​
​
Sample response​
​
HTTP/1.1 200 OK​
Date: Sat, 07 Oct 2023 09:02:23 GMT​
Server: TosServer​
x-tos-id-2: 1e89f203jld00006-a444fd0​
x-tos-request-id: 1e89f203b2d00006-a444ed0​
Content-Length: 1024​
​
// Result image content​
[Object]​
​
​
Last updated: 2025.12.03 16:14:57