Erik André Jakobsen documented replacing manual image selection with Astro and Typst. Titles from the content collection pass through getStaticPaths to static PNG endpoints, which invoke the Typst CLI and return image bytes. Official Astro documentation confirms that static endpoints generate files at build time. Part of a SHA-256 hash of the template and title is attached to the image URL, changing the cache key only when either changes. This differs from rendering on a server for every request.
Back to Tech
Astro and Typst automate social-preview images and cache keys
Static PNG endpoints run at build time, so the build environment needs the Typst executable.