One size of a file, in one format, as a preset makes it: what a renderer
(Storehouse.Renderer) is given to render it, or to build its URL.
:source- the original's key.:preset- the preset's name, an atom.:width- one of the preset's widths.:height- the height of the box, ornilfor any height.:fit-:inside(scaled to fit the box, its proportions kept) or:cover(cropped to fill it).:focus- what a crop keeps::centre,:attention(what stands out),:entropy(the busiest part), or{x, y}, a point in fractions of the width and height from the top left.:format-:webp,:jpeg,:png,:avif,:gif. For a URL, the preset's::originalamong them, and a list, in order, when the format is chosen from the browser'sAccept.:quality- 1 to 100, ornilfor the renderer's own.:profile-:srgb(converted to sRGB) or:keep(its colour profile kept, for wide-gamut photographs).:metadata-:none(none of the original's EXIF, IPTC or XMP) or:all.:background-"#rrggbb", under transparency a format without it (JPEG) cannot keep.:options- the preset's options for a renderer of its own, by renderer:imgproxy: "fq:webp:86".:fingerprint- eight hex digits of all of the above that change the image: a preset changed is a new URL, and a new key.
Summary
Types
@type format() :: :webp | :jpeg | :png | :avif | :gif
@type t() :: %Storehouse.Variant{ background: String.t() | nil, fingerprint: String.t(), fit: :inside | :cover, focus: :centre | :attention | :entropy | {number(), number()}, format: format() | :original | [format() | :original], height: pos_integer() | nil, metadata: :none | :all, options: keyword(), preset: atom(), profile: :srgb | :keep, quality: 1..100 | nil, source: String.t(), width: pos_integer() }