About Image Processing

Last update:2024-10-22 13:55:52

In many websites, original images often need transformations such as conversion, cropping, resizing, rotating, or watermarking to meet business needs. Processing every image back at the origin server can place a significant workload on the server. CDNetworks’ image processing service integrates these image processing functions directly into the CDN, allowing images to be processed and cached on the CDN. This enables rapid distribution of processed images to end-users, significantly enhancing image access speed.

Best Practice Scenarios

The image processing functionality is suitable for various scenarios, including but not limited to:

  • Websites that need to handle a massive volume of images, especially in industries like e-commerce, news portal, social media, and user-generated content (UGC).
  • Websites concerned about the cost, performance, stability, and ease of use of image processing.
  • Mobile networks and devices, where the image processing functionality stands out in mobile acceleration.
  • Global businesses, allowing for localized image processing based on the needs of different markets, fulfilling the specific requirements of regional websites.

Why Choose CDNetworks Image Processing

By using CDNetworks’ image processing service, you can enjoy:

  • Faster Distribution: Once the original unprocessed image is successfully cached at the CDN edge server, the CDN will process the cached original image and respond directly to the user, significantly reducing the need to fetch data from the origin server and accelerating content delivery time.

  • Reduced Load on Origin Servers: Compared to traditional methods that rely on origin server processing, this service undertakes all image processing tasks at CDN, greatly freeing up the origin server’s storage and workload.

  • More Flexible Service: The image processing functionality supports a wide range of image processing parameter configurations, making it easy for users to customize image processing strategies based on different end devices and browser characteristics, fully meeting the diverse needs of businesses.

  • More Customized Service: Beyond standard image processing features, you can also utilize CDNetworks’ Edge Computing Ability (ECA) to implement even more personalized image processing solutions.

How to Use the Image Processing

We offer two methods of use: Adaptive Processing and Carrying Image Processing Parameters in the URL.

Adaptive Processing

Adaptive processing allows you to pre-configure desired image types and methods of image processing. Once set, whenever end-users access a specified type of image, the system automatically processes it according to the predetermined settings without requiring additional URL parameters.

Note that adaptive processing setups cannot be self-help configured on the console. You will need to provide details about the types of images and the specific processing requirements, which our technical staff will configure in the backend.

Carrying Image Processing Parameters in the URL

Directly specify image processing operations by embedding specific parameters in the image URL. For example, to resize an image to 50x50 pixels, add the parameter resize=p_1,w_50,h_50 to the image URL:

http://example.domain.com/image.jpg?resize=p_1,w_50,h_50

For a complete list of parameters and detailed methodologies, please refer to each image processing section of our CDN documentation.

Cache Note: Processed images are cached on the CDN edge servers. As long as the cache remains valid, requests for the same processed image are served directly from the cache. This will speed up image loading times.

Function List

Function Description
Image Compression Reduces the file size by lowering the image quality, thereby decreasing the Content-length of the image.
Image Cropping Crops the image. Supports various methodssuch as anchor cropping, center cropping, gravity cropping, and index cropping. Also supports specific cropping methods like square cropping and edge padding.
Image Resizing Changes the width, height, and resolution of the image. Supports forced scaling, which adjusts dimensions regardless of the original aspect ratio, and scaling by percentage, which maintains the aspect ratio.
Image Rotation Rotates the image either automatically based on orientation metadata exif of the image, or to a specified angle clockwise, allowing for precise angular adjustments.
Image Format Conversion Converts the image to other formats. Supported formats include JPEG/JPG, PNG, GIF, and WebP.
Image Styles Offers a variety of style adjustments including:
- Adjusting the image’s brightness, contrast, and sharpness.
- Converting the image to grayscale.
- Setting a specific background color of the image.
- Adding a border to the image.
Image Watermarking Adds image, text or image-text mixed watermarks to the image.
GIF Frame Extraction Extracts individual frames from a GIF animation.
Image Metadata Extraction Extracts intrinsic information from the image, including dimensions, format, and others.

For complete feature details, please download the image processing user guide.

Is the content of this document helpful to you?
Yes
I have suggestion
Submitted successfully! Thank you very much for your feedback, we will continue to strive to do better!