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 |
|
Social media |
|
Online education |
|
Design resource websites |
|
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.
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
Log on to the ESA console.
In the left-side navigation pane, click Websites.
On the Websites page, find the website that you want to manage, and click the website name or View Details in the Actions column.
In the left-side navigation pane, click Speed and Network, and choose the Speed Optimization tab.
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 |
format | Converts images into specified formats. | |
quality | Adjusts the quality of images. | |
crop | Crops images. | |
resize | Resizes images. Currently, the feature only supports decreasing the size of images. | |
| Rotates images based on the orientation parameter, or rotates images clockwise based on the angle that you specify. | |
| Adjusts the brightness, contrast, and sharpness of images. | |
watermark | Adds picture or text watermarks to images. | |
info | Queries image information, including the width, height, format, and quality. |