Top-level rendering facade. Given a template + binding values, produces a PNG (cached) and returns its public URL.
Pipeline:
template + context ─► cache lookup
│
├── hit ──► served path
│
└── miss ──► SVG generation
rasterize (rsvg-convert)
atomic write to cache
served pathWhen the rasterizer isn't installed (:rasterizer_missing), the
caller (PhoenixKitOG.refine_og/4) is expected to drop back to the
pre-existing og.image — never a crash.
Summary
Functions
Returns just the public URL for a key (whether or not it exists).
Returns {:ok, public_url} on success, {:error, reason} on
failure. Side effect: caches the PNG on disk so the next call is a
no-op.
Functions
Returns just the public URL for a key (whether or not it exists).
@spec render_url(PhoenixKitOG.Schemas.Template.t(), map()) :: {:ok, String.t()} | {:error, term()}
Returns {:ok, public_url} on success, {:error, reason} on
failure. Side effect: caches the PNG on disk so the next call is a
no-op.