Image scaling Last updated: 12. Aug 2026
Read about the different scaling modes here.
Scaling modes
Mode | Description |
|---|---|
0 | Scale to fit |
1 | Scale to fill |
2 | No ratio rescale |
3 | Scale with white margin |
4 | Scale with black margin |
5 | No scaling |
See more detailed explanations of each mode below.
Scaling modes explained
>
Scale to fit (0)
The system scales down the image so that it fits within the format defined in the specified width and height parameters. If it is already smaller it keeps it's original size.
Either the width and/or the height is defined
The image does not fill the entire target area if the height/width format in the image does not match
The image is never scaled up if it is too small
Transparent background does not work if the image is rescaled
Images get the optimal file size
Examples
>
Scale to fill (1)
The system automatically crops the image to fit the format defined in the web pages.
All images end up the same size, and exactly the size defined regardless of the height/width ratio
The whole image is not always included
Cropping may occur - the top/bottom or left/right part of the image can be cut away.
Transparent background does not work if the image is rescaled
Images may be scaled up if they are too small
Images get the optimal file size
Examples
>
No ratio rescale (2)
Image is rescaled and stretched.
>
Scale with white margin (3)
The system scales the image down so that it fits within the format defined in the web pages, and fills the surrounding area with white so that the image always reaches the target size.
The image fills the entire target area even if the height/width format of the image does not match
The image is not scaled up if it is too small
Transparent background does not work if the image is rescaled
Images get the optimal file size
The image may be padded with white edges above or below if the size format does not match the target area
Examples
>
Scale with black margin (4)
>
No scaling (5)
Images are used at the size they were uploaded and are not rescaled.
The image is re-encoded even though the size is kept - the bytes are not identical to the original
If you need the original file unchanged, use linkFile instead of a scaling URL
The browser may scale the images itself if it is defined in CSS
Images can be unnecessarily large relative to their display size