History
Introduction
API Category
Making API Requests
Region APIs
Instance APIs
Cloud Hosting Cluster APIs
Image APIs
Instance Launch Template APIs
Placement Group APIs
Key APIs
Security Group APIs
Network APIs
Data Types
Error Codes
cos:GetObject。cos:PutObject。cos:PutObject。GET /<ObjectKey>?imageMogr2/format/webp HTTP/1.1Host: <BucketName-APPID>.cos.<Region>.myqcloud.comDate: <GMT Date>Authorization: <Auth String>
PUT /<ObjectKey> HTTP/1.1Host: <BucketName-APPID>.cos.<Region>.myqcloud.comDate: <GMT Date>Authorization: <Auth String>Pic-Operations:{"is_pic_info": 1,"rules": [{"fileid": "exampleobject","rule": "imageMogr2/format/webp"}]}
POST /<ObjectKey>?image_process HTTP/1.1Host: <BucketName-APPID>.cos.<Region>.myqcloud.comDate: <GMT Date>Content-length: <Size>Authorization: <Auth String>Pic-Operations:{"is_pic_info": 1,"rules": [{"fileid": "exampleobject","rule": "imageMogr2/format/webp"}]}
参数 | 含义 | 类型 | 是否必选 |
ObjectKey | 对象文件名,例如 folder/sample.jpg。 | String | 是 |
/format/<Format> | 压缩格式,此处为 webp。 | String | 是 |

http://example-1258125638.cos.ap-shanghai.myqcloud.com/sample.png?imageMogr2/format/webp

格式 | 图片大小 |
PNG(原图) | 1335.2KB |
WebP | 65KB(压缩率95.13%) |
文档反馈