Dynamic Route for CDN (DCDN) allows you to edit images stored on DCDN nodes. For example, you can add watermarks to images and convert image formats. This topic describes how to edit images and the benefits of this feature.
- This feature is in private preview. To participate in the private preview, submit ticket.
- This feature is free of charge during the private preview. After it is officially released, it charges fees. For more information, see the product updates.
- Quick delivery: After the base image is cached on CDN nodes, the CDN nodes directly resize the image based on requests and return resized images to the requests. This improves the delivery efficiency.
- Reduced workloads on origin servers: Images that are edited and stored on origin servers consume storage and computing resources of origin servers. This also increases the maintenance cost of origin servers. This feature allows images to be edited and cached on DCDN nodes. Therefore, workloads on origin servers are reduced.
- Improved refresh and prefetch efficiency: After a base image expires, all images edited based on the base image are expired and become unavailable. To address this issue, images are edited and cached on CDN nodes. This solution reduces the frequency of refresh and prefetch tasks and the bandwidth usage of back-to-origin requests. Newly edited mages are cached on CDN nodes to ensure the availability of base images and edited images.
- Image editing on CDN nodes: This feature can edit images based on user browsers and clients. It helps you meet the requirements of different users.
DCDN allows you to edit images that are cached on DCDN nodes. You can pass parameters
to edit images. The
image_process parameter in requests is used to specify how you want to edit the images. You can
pass multiple parameters such as
rotate to image_process. Separate multiple parameters with forward slashes (/).
You can pass one or more parameters to image_process based on your business requirements. The following table describes the parameters that are used to edit images stored on DCDN nodes in different scenarios.
|Convert image formats||format||Converts the image format.|
|Adjust image quality||quality||Adjusts the quality of images.|
|Crop images||crop||Crops images.|
|Resize images||resize||Resizes images to a specified size.|
||Automatically rotates images to a proper orientation or rotates images clockwise based on the specified angle.|
|Change the color of images||
||Adjusts the brightness, contrast, and sharpness of images.|
|Manage image watermarks||watermark||Adds picture or text watermarks to images.|
|Query image information||info||Queries image information, including the width, height, size, format, and quality.|