All Products
Search
Document Center

Edge Security Acceleration:Image optimization

Last Updated:Jun 17, 2026

Edge Security Acceleration (ESA) provides image transformation features. It transforms the format or quality of origin images, crops and scales them, and caches the results. This improves image delivery speed and reduces back-to-origin traffic.

Note

Image optimization rules apply only to requests that match the specified conditions. For website-level image optimization, see Configure image transformations.

Use cases

With ESA image processing, ESA edge nodes handle all transformations and caching without impacting your origin server.

The following table lists common use cases. This list is not exhaustive.

Use case

Description

E-commerce platforms

  • Process images in various styles for different devices, reducing manual editing effort.

  • Compress product photos and user-generated images to reduce file size and lower traffic costs.

  • Add a watermark for copyright protection, branding, and promotion.

Social media

  • Edit images to meet standard processing requirements for social media content.

  • Add a watermark to protect personal content from unauthorized use.

Online education

  • Edit images to meet standard processing requirements for educational materials and course content.

  • Apply different compression features to balance file size and visual quality for various scenarios.

Design resource websites

  • Process images in various styles for different devices, reducing manual editing effort.

  • For websites that rely on high-resolution images, use automatic optimization to apply visually lossless compression, maximizing file size reduction without degrading quality and improving load speeds.

Limits

The following limits apply when using image processing features.

Original image limits:

  • Supported image formats include JPEG, JPG, PNG, WebP, BMP, GIF, TIFF, and JPEG 2000.

  • The original image size must not exceed 10 MB.

  • The product of width × height must not exceed 16,777,216 pixels.

    Note

    For GIF images, the total width × height is the sum across all frames. You can use tools such as ImageMagick to view frame details of a GIF image.

Transformed image limits:

  • The product of width × height must not exceed 16,777,216 pixels.

  • When converting to WebP format, the product of width × height must not exceed 16,777,216 pixels, and neither width nor height may exceed 16,384 pixels individually. If the source image is animated, it becomes a static image after conversion to WebP.

Cache prefetching limits:

The image transformations feature does not apply to cache-prefetched content. During cache prefetch, ESA nodes only origin fetch the original image files and do not perform image transformations.

Create image optimization rule

  1. In the ESA console, click Websites. In the Website column, click the target website.

  2. In the left-side navigation pane, choose Rules > Content Optimization.

  3. Click the Image Optimization tab, click Create Rule, and enter a Rule Name.

  4. In the If requests match... section, define the conditions to match incoming user requests. For more information, see Rule expression components.

  5. Enable Image Transformations.

Transformation validation

Original request

Request example.com/bb.jpeg. The response returns a normally oriented image in .jpeg format.

image

Transformed request

  • Format conversion: To convert a .jpeg image to .png, change the request URL to example.com/bb.jpeg?image_process=format,png. The response returns a .png image.

    image

  • Image rotation: To rotate the image 90° clockwise, change the request URL to example.com/bb.jpeg?image_process=rotate,90. The response returns the image rotated 90° clockwise.

    image

Supported image processing operations

Note

After you enable image optimization, add one or more processing parameters to the request URL to perform transformations. The following table describes the supported parameters.

Image processing feature

Processing parameter

Description

Format conversion

format

Convert the image format.

Quality conversion

quality

Adjust image quality.

Image cropping

crop

Crop the image to a specified size.

Image scaling

resize

Scale the image to a specified size. Currently, only downscaling is supported; upscaling is not available.

Image rotation

  • Automatic rotation: auto-orient

  • Specified rotation: rotate

Automatically rotate the image based on its metadata, or rotate it clockwise by a specified angle.

Image color

  • Brightness: bright

  • Contrast: contrast

  • Sharpening: sharpen

Adjust image brightness, contrast, and definition.

Add watermark

watermark

Add an image or text watermark to the picture.

Get info

info

Retrieve image information, including dimensions, format, and quality.

Related documentation

Rule-related features vary in effective priority, reentrancy, and effective granularity. For details, see Properties of Rule-Related Features.