When distributing mass images with Tencent Cloud CDN, you can enable image optimization. This feature can compress images that meet specified requirements into WebP, Guetzli, and TPG formats, while drastically reducing downstream traffic and costs.
Log in to the CDN console, select Domain Management on the left sidebar. Click Manage on the right of a domain name configured with a COS origin. On the page that appears, select Image Optimization.
Tencent Cloud CI provides you a secure, stable and efficient cloud data processing service. When images (Webp, Guetzli, TPG) are processed, charges for the CI service will be incurred. For more billing details, see Billing Overview.
When WebP adaptation is enabled, images that meet the following compression requirements will be processed and returned. If these requirements are not met, the original images will be returned.
- The charges incurred are included in the billable item "Basic Image Processing" of your CI bill.
- The image to be processed should not be larger than 20 MB, with the width and height not exceeding 30,000 pixels and the total number of pixels not exceeding 100 million. The width and height of the output image should not exceed 9,999 pixels.
- For an input animated image, the total number of pixels (Width x Height x Number of frames) cannot exceed 100 million pixels (GIF frame limit: 300).
The CI-launched Guetzli image compression feature is visually lossless. It compresses JPG images at a high ratio to reduce the downstream traffic and increase the download speed. By taking advantage of human beings’ insensitivity toward specific color gamuts and details, Guetzli discards specific details to reduce download traffic by 35% to 50% without changing quality.
When Guetzli adaptation is enabled, images that meet the following compression requirements will be processed and returned.
- The charges incurred are included in the billable item "Guetzli Compression" of your CI bill.
- After you enable Guetzli, the original JPG image will be returned when you access the image for the first time, and Guetzli will compress the image asynchronously. If you request the image again after the compression is complete, the compressed image will be returned.
- Currently, Guetzli can process JPG images whose quality is greater than 70 and number of pixels is smaller than 4 million.
TPG adaption is a CI-launched advanced image compression feature. It converts images into TPG format with smaller image size, greatly reducing the download traffic and improving the page load speed.
When TPG adaption is enabled, images that meet the following compression requirements will be processed and returned.
The charges incurred are included in the billable item "Image Advanced Compression" of your CI bill.
After image optimization is enabled, the cache key of the request URL will change and conflict with the configured cache key rules. In this case, the cache key rules take higher priority.
For example, when image optimization is enabled for JPG files, the request URL
http://www.test.com/a.jpg?colour=red changes to
http://www.test.com/a.jpgxxxxxx ?colour=red, which conflicts with the configured cache key rule that ignores all parameters for all files. In this case, the rule will be executed, and the request URL will eventually change to