The image service is accessed by GET request of standard HTTP and all processing parameters are also in the QueryString of URL.
(a) Old interface: connect “?img/processing parameters” after the original file address
For example, http://downloads.s3.cn-north-1.jdcloud-oss.com/lena.jpg?img/s/200/300
(b) New interface: connect “?x-oss-process=img/processing parameters” after the original file address
For example, http://downloads.s3.cn-north-1.jdcloud-oss.com/lena.jpg?x-oss-process=img/s/200/300
(a) File direct download mode
For example, http://downloads.s3.cn-north-1.jdcloud-oss.com/lena.jpg
(b) Image processing parameter mode
For example, http://downloads.s3.cn-north-1.jdcloud-oss.com/lena.jpg?x-oss-process=img/o
Connect image processing instructions as a processing queue in sequence and segment each task name and ancillary parameter with “/”; then background will execute them in sequence.
For example:
Original image address: http://downloads.s3.cn-north-1.jdcloud-oss.com/lena.jpg
Processing mode: scale in turn and crop in the center
Resultant address of relative image processing:
http://downloads.s3.cn-north-1.jdcloud-oss.com/lena.jpg?x-oss-process=img/s/200/300/cc/200/260
In the processing queue, sequential execution will affect final results.
Cap of the maximum number of processing actions of a single request <=100; repetitive operation is accumulated.
For example, in http://downloads.s3.cn-north-1.jdcloud-oss.com/lena.jpg?x-oss-process=img/s/200/300/cc/200/260
Scale s and center crop cc are recorded as two actions.
For example, in http://downloads.s3.cn-north-1.jdcloud-oss.com/lena.jpg?x-oss-process=img/s/200/300/cc/200/260
The part of processing parameters includes img/s/200/300/cc/200/260
Image processing can save user's image processing actions and parameters as another name (e.g. Stylename), namely style. After using the style function, a same effect can be archived only with a very short URL to replace the original series of actions.
(a) Old interface
http://downloads.s3.cn-north-1.jdcloud-oss.com/lena.jpg?imgalias/stylename
(b) New interface
http://downloads.s3.cn-north-1.jdcloud-oss.com/lena.jpg?x-oss-process=imgalias/stylename
Image processing includes the following keywords imgalias,img,imginfo,imgexif,x-oss-process=imgalias,x-oss-process=img,x-oss-process=imginfo,x-oss-process=imgexif
Under circumstances where the parameter image processing parameter is legal, only one of the above keywords can appear
For example:
bucketname.s3.cn-north-1.jdcloud-oss.com/key.jpg?imgalias/style&img/s/100/200 (illegal)
bucketname.s3.cn-north-1.jdcloud-oss.com/bucket/key.jpg?imgalias/style&x-oss-process=imgalias/style2 (illegal)
bucketname.s3.cn-north-1.jdcloud-oss.com/key.jpg?imgalias/style (legal)
imgalias, img, x-oss-process=imgalias, x-oss-process=img parameter must be followed by a specific parameter
For example:
bucketname.s3.cn-north-1.jdcloud-oss.com/key.jpg?imgalias/ (illegal)
KV of RequestQuery has no specified sequence
For example:
bucketname.s3.cn-north-1.jdcloud-oss.com/key.jpg?aaa=bb&imgalias/style (legal)
RequestQuery case sensitivity(KV has case sensitivity)
For example:
bucketname.s3.cn-north-1.jdcloud-oss.com/key.jpg?imgalias/style (legal)
bucketname.s3.cn-north-1.jdcloud-oss.com/key.jpg?Imgalias/style (access artwork normally)
我们的产品专家为您找到最合适的产品/解决⽅案
1v1线上咨询获取售前专业咨询
专业产品顾问,随时随地沟通