---
title: Fit-in
description: Resize images to fit within specified dimensions without cropping, preserving the entire content. Optionally, fill the remaining space with a solid color or transparency.
url: https://storyblok.com/docs/api/image-service/operations/fit-in
---

# Fit-in

Use the `fit-in` argument to resize the image to fit within the specified dimensions without cropping.

To fill the remaining space with color, apply the `fill` filter: `filters:fill(CCCCCC)` using a hexadecimal RGB value (omit the `#)`. For transparent fills, use `filters:fill(transparent)` combined with the format filter: `:format(png)`.

In the interactive demo below, enable `fit-in` by enabling the background settings.

> [!NOTE]
> The interactive Image Service demo is not available in the Markdown version of this page.

## Pagination

-   [Previous: Crop](/docs/api/image-service/operations/crop)
-   [Next: Flip](/docs/api/image-service/operations/flip)
