Per-render-process registry of image transforms requested by Astral content.
Rendering discovers image variants before the builder generates them. The registry is process-local so concurrent builds do not share state.
Summary
Functions
Register an image transform and return the canonical transform.
Return the site currently being rendered.
Start an empty image registry for a site build.
Clear the current process registry.
Return all registered transforms.
Types
@type state() :: %{ site: Astral.Site.t() | nil, transforms: %{required(String.t()) => Astral.Image.Transform.t()} }
Functions
@spec add(Astral.Image.Transform.t()) :: Astral.Image.Transform.t()
Register an image transform and return the canonical transform.
@spec site() :: Astral.Site.t() | nil
Return the site currently being rendered.
@spec start(Astral.Site.t()) :: :ok
Start an empty image registry for a site build.
@spec stop() :: :ok
Clear the current process registry.
@spec transforms() :: [Astral.Image.Transform.t()]
Return all registered transforms.