---
title: "Fit"
description: "Fit"
url: "https://www.contentstack.com/docs/developers/sdks/content-delivery-sdk/swift/reference/fit"
product: "Contentstack"
doc_type: "guide"
audience:
  - developers
  - admins
version: "current"
last_updated: "2026-09-22"
---

# Fit

## Fit

The fit parameter enables you to fit the given image properly within the specified height and width. You need to provide values for the height, width and fit parameters

If fit is set to bounds, it will constrain the given image into the specified height and width.

If fit is set to crop, it will crop the given image to the defined height and width.

## Fit | Swift Delivery SDK | Contentstack

Fit lets you fit an image within a specified height and width using the Contentstack Swift Delivery SDK.