# `Image.Plug.Pipeline.Ops.Resize`
[🔗](https://github.com/elixir-image/image_plug/blob/v0.1.0/lib/image/plug/pipeline/ops/resize.ex#L1)

Resize operation. Combines target dimensions, fit mode, gravity (focal
point for cropping), upscale policy, and DPR (device pixel ratio).

Either `:width`, `:height`, or both may be set. When only one is set,
the other is inferred from the source aspect ratio per the chosen
`:fit` mode.

`:width` may also be the atom `:auto`, mirroring Cloudflare's
client-hint-driven sizing. The interpreter resolves it to a concrete
pixel count from request hints; if no hint is available it falls back
to the source width.

# `fit`

```elixir
@type fit() :: :contain | :cover | :crop | :pad | :scale_down | :squeeze
```

# `gravity`

```elixir
@type gravity() ::
  :auto
  | :face
  | :center
  | :north
  | :south
  | :east
  | :west
  | :north_east
  | :north_west
  | :south_east
  | :south_west
  | {:xy, float(), float()}
```

# `t`

```elixir
@type t() :: %Image.Plug.Pipeline.Ops.Resize{
  dpr: pos_integer(),
  face_zoom: float(),
  fit: fit(),
  gravity: gravity(),
  height: nil | pos_integer(),
  size_pct: nil | number(),
  upscale?: boolean(),
  width: nil | :auto | pos_integer()
}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
