Skip to content

twocaretcat/astro-snapshot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

62 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Project logo

Astro Snapshot

Project category Language Repository size Project license Semantic Release

Latest release View package on JSR View package on JSR View package on npmjs

An Astro integration for generating screenshots of your pages automatically at build time


πŸ‘‹ About

Generate screenshots of your Astro pages automatically at build time with Astro Snapshot. Perfect for creating social images, content previews, dynamic icons, and more!

This integration was inspired by astro-selfie and a similar plugin I wrote for Gatsby called Gatsby Plugin: Component to Image. Compared to astro-selfie, this integration exposes a lot more configuration options which allow you to completely customize how images are generated.

Features

  • 🧩 Framework agnostic: Generate images from any valid Astro page
    • Unlike other integrations for generating social images, not limited to preset layouts
    • Unlike Satori, not limited to certain types of JSX elements or CSS properties
    • Use whatever front-end framework you want
  • πŸ“Έ Customizable outputs: Full control over the generated images
    • Generate multiple images per page with different configurations
    • Save images to public, dist, src, or any other directory
    • Save PNG, JPEG, or WebP images, with the format automatically detected from the output filename
    • Save images at any resolution
    • Choose whether to overwrite existing images or skip them
  • βš™οΈ Flexible configuration: Advanced options for power users
    • Define global defaults to keep configs minimal and override them on a per-image basis
    • Pass through options directly to Puppeteer for precise control of the browser, viewport, and screenshot generation process
  • πŸ”§ TypeScript support: Full type safety for all options and functions
    • Import types from the package to make sure your config is correct
    • Install the package from JSR for use with TypeScript-native runtimes like Deno

Use Cases

  • 🏞️ Social images: Use your existing front-end components to generate Open Graph images and/or Twitter cards for your blog posts or other content
  • πŸ“° Content previews: Generate screenshots of your website for use in documentation, marketing materials, showcases, etc.
  • πŸ–ΌοΈ Favicons: Dynamically generate favicons for your website

πŸš€ Getting Started

For installation and usage instructions, please see the docs.

πŸ›Ÿ Support

Need help? See the support resources for information on how to:

  • request features
  • report bugs
  • ask questions
  • report security vulnerabilities

See the troubleshooting page in the docs for a list of common issues and their solutions.

🀝 Contributing

Want to help out? Pull requests are welcome for:

  • feature implementations
  • bug fixes
  • translations
  • documentation
  • tests

See the contribution guide for more details.

🧾 License

Copyright Β© 2026 John Goodliff (@twocaretcat).

This project is licensed under the MIT license. See the license for more details.

We are not affiliated with or endorsed by Astro.

πŸ–‡οΈ Related

Recommended

Other projects you might like:

Used By

Notable projects that depend on this one:

  • πŸ‘€ Tally: A free online tool to count the number of characters, words, paragraphs, and lines in your text. Tally uses this integration to generate social images.

Alternatives

Similar projects you might want to use instead:

  • 🌐 astro-selfie: A similar integration that automatically generates images for every page.

πŸ’• Funding

Find this project useful? Sponsoring me will help me cover costs and commit more time to open-source.

If you can't donate but still want to contribute, don't worry. There are many other ways to help out, like:

  • πŸ“’ reporting (submitting feature requests & bug reports)
  • πŸ‘¨β€πŸ’» coding (implementing features & fixing bugs)
  • πŸ“ writing (documenting & translating)
  • πŸ’¬ spreading the word
  • ⭐ starring the project

I appreciate the support!

About

An Astro integration for generating screenshots of your pages automatically at build time. Perfect for creating social images, content previews, dynamic icons, and more!

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Sponsor this project

  •  

Packages

 
 
 

Contributors