CI supports scaling, cropping, transcoding, watermarking, and more to meet your image processing needs.
Currently, CI supports JPG, BMP, GIF, PNG, and WebP, as well as HEIF decoding and processing. For more information, see Rules and Limits.
The size of an input image cannot be larger than 32 MB, its width and height cannot exceed 30,000 pixels, and the total number of pixels cannot exceed 250 million. The width and height of the output image cannot exceed 9,999 pixels. For a source animated image, Width x Height x Number of frames cannot exceed 250 million pixels.
CI uses Tencent Cloud Object Storage (COS) to store data. You can process images during the upload and store the results persistently in COS, or process images during the download.
"Permission denied" is prompted generally because no CI roles are bound. You can go to the Service Authorization page and click Grant to bind a CI role.
If you use a sub-account, this problem may be because the required operation permission is not granted. You can grant it as instructed in Authorizing Sub-Accounts to Access CI Services.
You can use COS Migration Tool or Migration Service Platform (MSP).
Note:Source bucket names and the corresponding List permissions are required for the migration.
Use the mirroring-based origin-pull feature of COS to bind the COS bucket to your origin and switch the image processing domain name to the CI domain name (CI will pull the original image from the origin and process it, and COS will pull it asynchronously). This method can be used to migrate images, but only those requested.
Yes. All you need to do is add the processing parameters at the end of the CDN file URL.
Yes. You can do this simply by using style separators. For example, url?imageMorg2/cut/400x400|watermark/1/xxx
can both crop and add a watermark to the image.
For billing details of basic image processing (e.g., cropping, scaling, transcoding, and watermarking) and value-added services (e.g., content recognition, blind watermarking, and Guetzli), see Billing Overview.
Images processed through an API during download won't be stored in your storage space.
Yes. You can also process images already stored in COS buckets.
Yes. You can encrypt URLs based on our encoding and decoding rules. Encrypted access is a customized feature. If you want to use it, please submit a ticket.
For example, to crop and add a watermark to an image at the same time, you can use the pipeline operator "|" to concatenate the processing parameters so as to perform the processing operations sequentially on the image.
Take the pipeline operator (|) as an example. It will be escaped or truncated by the WeChat Mini Program. Therefore, you need to redefine it.
You can:
%7C
.One possible cause is that the EXIF information of the original image accounts for the majority of the image size. If the image size shows little change after you adjust the image resolution, use the Strip
parameter to remove the EXIF information as instructed in Removing Image Metadata.
The possible causes are as follows:
http://
. In this case, http
cannot be omitted or replaced with https
.
Many parameters of CI’s image processing (e.g., text, color, and font of the text watermark, as well as the URL of the image watermark) need to be Base64 URL-safe encoded. The rules are as follows:
=
from the encoded results.CI will return 302 and redirect you to the URL of the image in COS for you to download the original image.
Guetzli is an image compression feature with no visual quality loss launched by CI. Once Guetzli is enabled, images in the bucket will be compressed with Guetzli upon the download, and x-GuetzliState
will be added to the HTTP header of the request to indicate the compression status. If Guetzli does not take effect, you can:
examplebucket-1250000000.picgz.myqcloud.com
and try again. Currently, using COS endpoints (format: examplebucket-1250000000.cos.ap-guangzhou.myqcloud.com
) for processing is not supported for some users.If you need to use the document-to-HTML preview service in the mini program, "Non-business domain names cannot be opened" may be prompted when you use the service for the first time. In this case, you can configure as follows:
Log in to the mini program backend and select Development > Development Management on the left sidebar.
Click Development Settings and locate the Business Domain Name section.
Click Start Configuration. In the pop-up window, add https://prvsh.myqcloud.com
and your COS bucket domain name such as examplebucket-1250000000.cos.ap-guangzhou.myqcloud.com
, click Download Verification File. Then, contact us and provide the verification file for configuration.
Was this page helpful?