Image transformations

Updated at: 2024-12-18 06:31

In various business contexts, you may need to resize, crop, rotate, or compress images from content sharing websites. However, initiating an origin request for each image processing task can substantially increase the number of origin requests and the cache size on points of presence (POPs). To address these challenges, Edge Security Acceleration (ESA) provides the image transformations feature. You can directly convert images based on your business requirements on ESA POPs. ESA also caches the converted images on POPs. This efficiently accelerates content retrieval and reduces origin traffic.

Scenarios

ESA enables images to be transformed and cached on ESA POPs, without affecting the running of the origin server.

The following table describes some common scenarios of image transformations.

Scenario

Description

Scenario

Description

E-commerce platforms

  • Provides abundant image processing styles to meet different image display requirements on multiple devices, and enables efficient and simplified image editing.

  • Allows compression of product images and image comments to reduce image sizes, which further reduces traffic costs.

  • Supports using brand name or logo as watermarks to protect copyrights and promote products.

Social media

  • Allows you to easily and flexibly convert your images into standard formats that you can post on social media.

  • Supports using watermarks to prevent image theft.

Online education

  • Edits images for online education based on user requirements.

  • Allows you to apply compression features as needed to balance the compression costs and image quality.

Design resource websites

  • Provides abundant image processing styles to meet different image display requirements on multiple devices, and enables efficient and simplified image editing.

  • Allows you to compress images without compromising the image quality to accelerate image delivery. This allows websites to provide high-resolution images.

Benefits

The image transformations feature delivers the following benefits:

  • Accelerated delivery: After source images are cached on POPs, client requests for images of different sizes can be directly handled on the POPs and transformed images are returned from the POPs to the clients. This reduces unnecessary trips to the origin and ensures faster response times.

  • Reduced loads on the origin: Image transformations on the origin server consume a large number of storage and computing resources, which increases the maintenance costs of the origin server. ESA supports image processing and caching on POPs, which alleviates strain on the origin server.

  • Custom image editing on POPs: You can specify image editing parameters to transform images to adapt to different browsers and clients.

Limitations

Before you use image transformations, take note of the following items:

Source images

  • You can use this feature to transform only images in the following formats: JPEG, JPG, PNG, WebP, BMP, GIF, TIFF, and JPEG 2000.

  • The size of a source image cannot exceed 10 MB.

  • The total number of pixels of a source image cannot exceed 16,777,216.

Note

For a GIF image, the total number of pixels is the sum of all frames. You can use tools such as ImageMagick to query the frame information about a GIF image.

Transformed images

  • The total number of pixels of a transformed image cannot exceed 16,777,216.

  • If you want to convert an image into the WebP format, the total number of pixels of the image cannot exceed 16,777,216, and neither the width nor the height can exceed 16,384 pixels. If you convert an animated image into the WebP format, the result is a static image.

Enable image transformation

  1. Log on to the ESA console.

  2. In the left-side navigation pane, click Websites.

  3. On the Websites page, find the website that you want to manage, and click the website name or View Details in the Actions column.

  4. In the left-side navigation pane, click Speed and Network, and choose the Speed Optimization tab.

  5. Enable Image Transformations. Then you can add image editing parameters to request URLs to transform images as needed. For more information, see Image editing methods.

Image editing methods

The following table describes the image editing parameters that are supported by ESA.

Method

Parameter

Description

Method

Parameter

Description

Convert image formats

format

Converts images into specified formats.

Adjust image quality

quality

Adjusts the quality of images.

Crop images

crop

Crops images.

Resize images

resize

Resizes images. Currently, the feature only supports decreasing the size of images.

Rotate images

  • auto-orient: automatically rotates images.

  • rotate: rotates images to specific orientations.

Rotates images based on the orientation parameter, or rotates images clockwise based on the angle that you specify.

Change the color of images

  • bright: the brightness of images.

  • contrast: the contrast of images.

  • sharpen: the sharpness of images.

Adjusts the brightness, contrast, and sharpness of images.

Add watermarks

watermark

Adds picture or text watermarks to images.

Query image information

info

Queries image information, including the width, height, format, and quality.

  • On this page
  • Scenarios
  • Benefits
  • Limitations
  • Enable image transformation
  • Image editing methods
Feedback