---
title: "resizable(capInsets:resizingMode:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/image/resizable(capinsets:resizingmode:)"
---

# resizable(capInsets:resizingMode:)

Sets the mode by which SwiftUI resizes an image to fit its space.

## Declaration

```swift
func resizable(capInsets: EdgeInsets = EdgeInsets(), resizingMode: Image.ResizingMode = .stretch) -> Image
```

## Parameters

- `capInsets`: Inset values that indicate a portion of the image that SwiftUI doesn’t resize.
- `resizingMode`: The mode by which SwiftUI resizes the image.

## Mentioned in

Fitting images into available space

## Return Value

Return Value An image, with the new resizing behavior set.
