# `Astral.Image.Format`
[🔗](https://github.com/elixir-volt/astral/blob/v0.7.0/lib/astral/image/format.ex#L1)

Canonical image format normalization for Astral's image pipeline.

# `t`

```elixir
@type t() :: :jpg | :jpeg | :png | :webp | :avif | :svg | :unknown
```

# `extension`

```elixir
@spec extension(t()) :: String.t()
```

Return the canonical file extension for an output format.

# `extensions`

```elixir
@spec extensions() :: [String.t()]
```

Return supported local image file extensions.

# `from_path`

```elixir
@spec from_path(String.t()) :: t()
```

Return the source format represented by a filesystem path.

# `mime_type`

```elixir
@spec mime_type(t()) :: String.t()
```

Return a browser MIME type for a format.

# `normalize`

```elixir
@spec normalize(atom() | String.t()) :: t()
```

Normalize a user-provided output format.

# `optimizable?`

```elixir
@spec optimizable?(term()) :: boolean()
```

Return true when a format can be emitted by the optimization backend.

# `output!`

```elixir
@spec output!(atom() | String.t()) :: :jpg | :jpeg | :png | :webp | :avif
```

Normalize and validate a user-provided output format.

# `suffix`

```elixir
@spec suffix(t()) :: String.t()
```

Return the suffix option expected by the Image package writer.

---

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