Image Serving fit command

Issue

Is it possible to avoid having the Image Server pad an image if the aspect ratio does not match the width and height? Can I use fit with UGC (user-generated content) images, such as on a decal area or with IS templates?

Solution

Avoid padding to maintain aspect ratio

You can use the fit command to scale an image. This procedure is not recommended, since it can either distort the image, or crop aspects of it. A better option is to maintain a consistent aspect ratio for uploaded content. Or, you can allow the images to maintain aspect ratio by not restricting the height or width. If these methods are not an option, see the documentation for the fit command: