Skip to main content

Image parameters

info

The following parameter list applies to the type=image parameter.

format

string

Forces the image to be encoded in a specific output image format

auto | png | jpeg | webp | gif
Values

Encodes the output image in the specified format. If the output image contains transparencies, a check pattern is calculated in the transparent areas in the output format jpeg. To prevent this, the matte effect must be used beforehand. The default value auto causes the supported format to be determined on the basis of the web browser client header Accept.

Sample Format
Format effect
?format=jpeg

quality

string

Determines the image quality with lossy compression

92
Default
0
Minimum
100
Maximum

Determines the image quality and, above all, the image size in the jpeg and webp formats.

Sample Quality
Quality effect
?quality=12

width

number

Output width in pixel

400
Default
1
Minimum
5120
Maximum

Defines the width of the output image. The source image is scaled to this size in real time. If the height is also specified at the same time, the image aspect ratio determines whether width or height is used. The maximum value is used.

Sample Width
Width effect
?width=150

height

number

Output height in pixel

300
Default
1
Minimum
2880
Maximum
tip
With the help of the pad effect, the image can also be provided with a border, so that width and height are maintained in any case.

The same specifications apply as for width.

encoding

string

Output encoding

image | base64
Values

Allows output as a normal, binary encoded image or as a base64 encoded string. This can be useful if the image is to be loaded only as a string in JavaScript, for example.

rect

float array

Crop range with relative coordinates

left,top,width,height
Syntax
left
0.0
Minimum
1.0
Maximum
top
0.0
Minimum
1.0
Maximum
width
0.0
Minimum
1.0
Maximum
height
0.0
Minimum
1.0
Maximum

Defines a crop area from the top and left edge and with width and height. The values are given as relative coordinates with values between 0 and 1. For example, a value of 0.25,0.25,0.5,0.5 zooms in an image to exactly in the centre of the image.

Sample Rect
Rect effect
?rect=0,0,1,1