Build-time optimized images for Astral pages, layouts, and Markdown content.
Calls to get_image/1 and get_picture/1 normalize local source images,
compute hashed output paths, register transforms for the post-render image
builder, and return render-ready image data.
Summary
Functions
Return an optimized image result for the current render.
Return an optimized image result for a site.
Return fallback and source-set results for a responsive picture.
Return fallback and source-set results for a responsive picture in a site.
Return true when a path looks like a supported local image.
Return source metadata for an image in the current render context.
Return source metadata for an image in a site.
Functions
@spec get_image(keyword() | map()) :: Astral.Image.Transform.t()
Return an optimized image result for the current render.
@spec get_image(Astral.Site.t(), keyword() | map()) :: Astral.Image.Transform.t()
Return an optimized image result for a site.
@spec get_picture(keyword() | map()) :: %{ fallback: Astral.Image.Transform.t(), sources: list() }
Return fallback and source-set results for a responsive picture.
@spec get_picture(Astral.Site.t(), keyword() | map()) :: %{ fallback: Astral.Image.Transform.t(), sources: list() }
Return fallback and source-set results for a responsive picture in a site.
Return true when a path looks like a supported local image.
@spec metadata(String.t() | Astral.Image.Source.t()) :: Astral.Image.Metadata.t()
Return source metadata for an image in the current render context.
@spec metadata(Astral.Site.t(), String.t() | Astral.Image.Source.t()) :: Astral.Image.Metadata.t()
Return source metadata for an image in a site.