Represents an image conversion configuration.
Conversions define how to transform images (resize, crop, etc.) and can be limited to specific collections.
Summary
Functions
Create a new conversion configuration.
Types
@type fit() :: :contain | :cover | :fill | :crop
@type format() :: :jpg | :png | :webp | :original
@type t() :: %PhxMediaLibrary.Conversion{ collections: [atom()], fit: fit(), format: format() | nil, height: pos_integer() | nil, name: atom(), quality: 1..100 | nil, queued: boolean(), width: pos_integer() | nil }
Functions
Create a new conversion configuration.
Options
:width- Target width in pixels:height- Target height in pixels:fit- Resize strategy (:contain,:cover,:fill,:crop):quality- Output quality for JPEG/WebP (1-100):format- Output format (:jpg,:png,:webp,:original):collections- Only apply to these collections (default: all):queued- Process asynchronously (default: true)