Remote image allowlisting and source caching.
Remote URLs are never optimized unless they match an explicit allow_remote
pattern. Redirects are followed manually and each destination must also match
the allowlist, mirroring Astro's security model.
Summary
Functions
Return true when a remote image URL matches configured allowlist patterns.
Return true when a source string is an HTTP(S) URL.
Resolve a remote image URL to a cached local source path.
Types
Functions
@spec allowed?(String.t(), Astral.Image.Config.t()) :: boolean()
Return true when a remote image URL matches configured allowlist patterns.
Return true when a source string is an HTTP(S) URL.
@spec resolve(String.t(), Astral.Image.Config.t()) :: {:ok, cached()} | {:error, term()}
Resolve a remote image URL to a cached local source path.