Fit fill
Log in to add to favouritesPage last updated 07 October 2026
When the fit=fill parameter is used in conjunction with the width and height parameters, the image is scaled to fit within those dimensions without cropping or distorting it, and the space left over is padded so that the result matches the dimensions exactly. The image is enlarged if it is smaller than the output size.
The colour of the padding is set by the background or bg parameter, given as a hex value. Without it the padding is transparent, which formats that cannot store transparency, such as JPEG, show as black. The background parameter must come after the fit, as it only fills transparency that exists at that point in the sequence.

The same request without a background, width=600&height=600&fit=fill, returns the same image with black bands, because the source is a JPEG.