This section lists the operations supported by Cloud CDN image optimization.
The table includes parameters, such as operation, syntax, attributes,
description and examples, which helps you create your imop query.
Cloud CDN image optimization supports a set of operations that let you transform your images, such as resize, crop and scale. Each operation has its own syntax, supported attributes and constraints.
This page lists the operations supported by Cloud CDN image optimization
with examples that help you create your imop query.
| Operation | Syntax and example | Attributes | Description |
|---|---|---|---|
|
https://www.example.com/image.jpg?imop=Resize,width=250,height=125 |
the maximum |
This operation doesn't preserve the aspect ratio when you specify both the width and height parameters. If you omit either dimension, Cloud CDN image optimization calculates the other to maintain the aspect ratio. By default, image optimization enforces a
strict downscale-only strategy. Specifying the |
|
https://www.example.com/image.jpg?imop=Scale,ratio=0.5 |
ratio
|
This operation scales the image by a specific factor and enforces downscaling only. Mutually exclusive with Resize and Crop operations. If you include the |
|
https://www.example.com/image.jpg?imop=Crop,shape=rectangle,left=0.5,snap_to_x=512 |
shape
left, right, top, bottom
snap_to_x, snap_to_y
|
This operation crops the image based on regional markers. If you specify an invalid
value for the The crop
coordinates automatically snap to the nearest multiple of the specified
|
|
https://www.example.com/image.jpg?imop=Canvas,width=250,height=125,background_color=FFF,gravity=center |
width, height
gravity
background_color
|
This operation enhances images by adding a background layout of specified
dimensions and color. The |
|
https://www.example.com/image.jpg?imop=Rotate,degrees=90 |
degrees
|
This operation rotates the target image clockwise. |
|
https://www.example.com/image.jpg?imop=Mirror,flip=h |
flip
|
This operation mirrors the image either horizontally, vertically, or both. |
|
https://www.example.com/image.jpg?imop=Compress,strength=medium |
strength
|
This operation compresses the image by decreasing the target image quality.
The |
|
https://www.example.com/image.jpg?imop=Convert,format=webp |
format
|
This operation changes the final delivery format of the image. If there is a
processing conflict with the browser's incoming |
|
https://www.example.com/image.jpg?imop=Metadata,preserve=none |
preserve
|
This operation controls how image metadata properties are handled during execution:
max: preserves all fields except EXIF orientation and color profiles which are applied on the transformation .
|
|
https://www.example.com/image.jpg?imop=tone,brightness=50,contrast=50,saturation=50 |
|
This operation dynamically modifies the |
|
https://www.example.com/image.jpg?imop=Sharpen,strength=50 |
strength
|
This operation increases the sharpness of the image. |
|
https://www.example.com/image.jpg?imop=Blur,strength=50 |
strength
|
This operation applies a localized blur filter across the image. |
|
https://www.example.com/image.gif?imop=freeze,frame=0 |
frame
|
This operation extracts a single, static frame from an animated image sequence, such as an animated GIF. The frame parameter specifies the exact frame index to extract. |