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 DateAuthorization: Auth StringPic-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 DateContent-length: SizeAuthorization: Auth StringPic-Operations:{"is_pic_info": 1,"rules": [{"fileid": "exampleobject","rule": "imageMogr2/format/webp"}]}
参数 | 含义 |
ObjectKey | 对象文件名,例如 folder/sample.jpg。 |
/format/<Format> | 压缩格式,此处为 webp。 |
http://example-1258125638.cos.ap-shanghai.myqcloud.com/sample.png?imageMogr2/format/webp
格式 | 图片大小 |
png(原图) | 1335.2KB |
webp | 65KB(压缩率95.13%) |
本页内容是否解决了您的问题?