---
title: Fit
summary: Fit controls how the image will be constrained within the provided size (width and height) values, in order to maintain the correct proportions.
url: https://www.fastly.com/documentation/reference/compute/sdks/go/compute-sdk-go/fsthttp/imageopto/enum.Fit/
---

**Kind:** Enum  
**Module:** [imageopto](https://www.fastly.com/documentation/reference/compute/sdks/go/compute-sdk-go/fsthttp/imageopto/)  
**Package:** compute-sdk-go v1.11.0  
**Source:** https://github.com/fastly/compute-sdk-go/blob/d6bf71b04516ed72d6018cab6fff701a865f86e5/fsthttp/imageopto/imageopto.go#L498

```go
type Fit string
```

Alias for `string`.

Fit controls how the image will be constrained within
the provided size (width and height) values, in order to maintain
the correct proportions.

## Methods

### String

**Source:** https://github.com/fastly/compute-sdk-go/blob/d6bf71b04516ed72d6018cab6fff701a865f86e5/fsthttp/imageopto/imageopto.go#L512

```go
func (f Fit) String() string
```

**Returns**

`string`
