Built for static sites
Designed to emit build-time assets for simple static hosting.
Call a function…
const asset = await emitAsset( 'my.gif', [], () => generateImage());…get the URL for your asset.
<img src={asset.src}>astro-emit-asset is an Astro integration that makes it possible to create files in the build output of a site as a “side effect” of pages, endpoints, and other code. Use it for open graph images, generated PDFs, audio files, or anything else you need.
Built for static sites
Designed to emit build-time assets for simple static hosting.
Automatic caching
Assets are cached across builds and only regenerated when their inputs change.
Full build compatibility
Emit assets from Markdown plugins, components, pages, static endpoints, or any other part of your build pipeline.
Integration ready
Use in your Astro integration to manage assets you need to create.