# `PhoenixImage`
[🔗](https://gitlab.com/clschnei/phoenix_image/blob/v0.1.0/lib/phoenix_image.ex#L1)

Public entry module for `phx_image`.

This package is primarily used through `PhoenixImage.Plug`, which exposes
an HTTP API for on-demand image transformation, and `PhoenixImage.Component`,
a Next.js-like `<.image />` function component for Phoenix templates.

Plug features:

- Fetch image from absolute `http/https` source or root-relative path
- Resize while preserving aspect ratio
- Transcode to `webp`, `avif`, `jpg`, or `png`
- Return long-lived cache headers

Component features:

- Familiar props (`src`, `alt`, `width`, `height`, `fill`, `sizes`, `quality`)
- Auto optimizer URL and `srcset` generation
- Optional `unoptimized` passthrough mode

See `PhoenixImage.Plug` and `PhoenixImage.Component` for details.

---

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