Image processing

更新时间:
复制 MD 格式

Image processing edits and distributes images on points of presence (POPs), reducing origin server loads and traffic. ApsaraVideo VOD supports automatic WebP conversion, automatic image rotation, and automatic compression. These features are independent from the image processing features of Object Storage Service (OSS). You can use either feature to process images.

Note
  • Image processing in Alibaba Cloud CDN, DCDN, and OSS are independent features and cannot be used interchangeably.

  • Image processing is a paid service; it will be offered free of charge during the public beta period, and the date when charges will apply will be announced separately.Image processing is a paid service; it is currently offered free of charge, and the date when fees will be introduced will be announced separately.

  • When you use image‑processing features, because different image formats employ vastly different compression algorithms, converting between them may result in an increase in file size. For example, converting from JPEG to WebP, from JPEG to PNG, or from PNG to WebP. If you need to reduce the file size of an image, we recommend lowering its quality by adjusting the quality parameter.

Limits

here are the following restrictions when using the image processing function:

  • Original limits

    • Image formats only support JPEG, JPG, PNG, WebP (static, frame number equals 1), BMP, GIF (dynamic only supports scaling and format conversion), TIFF, JPEG, 2000.

    • The original size cannot exceed 10MB.

    • The width x height of the original cannot exceed 16,777,216 px.

      Note

      If the image is in GIF format, the width × height of the original image of the GIF image is the sum of all frames. You can use tools such as ImageMagick to view the frame information of the GIF image.

    • If the original image is dynamic WebP (the number of frames is greater than 1), no form of image processing operation is supported. The image processing parameters do not take effect. CDN returns the original image directly.

  • Image limit after processing

    • The width x height of the picture cannot exceed 16,777,216 px.

    • When changing to the WebP format, the width × height of the picture cannot exceed 16,777,216 px, and the width and height cannot exceed 16,384 px.

  • Cache warm-up limit:The image conversion function does not take effect on the content of cache preheating, that is, the CDN node only returns to the source to obtain the original image file during cache preheating, and does not perform image conversion processing.

Procedure

  1. Log on to the ApsaraVideo VOD console.

  2. In the left-side navigation pane, choose Configuration Management > CDN Configuration > Domain Names.

  3. Find the domain name that you want to manage and click Configure in the Actions column.

  4. In the navigation pane on the left for the domain name, click Performance Optimization.

  5. In the Image Editing section, turn on the Image Editing switch, and select the image formats that you want to convert.

    Note
    • The image editing feature is enabled after you select the supported formats. Once enabled, image editing parameters in a URL take effect when you process images with file URLs.

    • You can decide whether to enable automatic conversion to WebP, automatic rotation (for auto-correction only), and automatic compression in the console.

    Parameter

    Description

    Supported Image Formats

    Select the image formats that you want to convert. This parameter is required, and you can select multiple formats.

    Automatic Conversion to WebP

    If this feature is enabled and the request's Accept header contains image/webp, Alibaba Cloud CDN automatically converts images from other formats to WebP before caching them.

    Note

    Enabling this feature may temporarily decrease the cache hit ratio. The ratio will return to normal after a short period. Do not enable this feature during peak business hours.

    Automatic Rotation

    Enables automatic correction of image orientation.

    Note
    • Automatic rotation applies only when the auto-orient parameter is used.

    • Enabling this feature may temporarily decrease the cache hit ratio. The ratio will return to normal after a short period. Do not enable this feature during peak business hours.

    Automatic Compression

    When enabled, this feature allows Alibaba Cloud CDN to compress images and reduce bandwidth usage without changing their resolution, dimensions, or format.

    • 0 (default): Disables the feature.

    • 1 to 100: Enables the feature. For example, a value of 90 means the image quality is retained at 90% of the original.

    Note

    This feature supports only the JPEG and WebP formats.

    Source Image Cache

    If a source image has multiple converted copies, enabling source image cache reduces the number of origin requests.

  6. Click OK.