astro-assets

Solid

Image and asset optimization in Astro 7 — <Image />, <Picture />, getImage(), remote images, @astrojs/sharp, Fonts API, OG image generation with Satori, Cloudinary/Imgix. Use for any image optimization or asset handling task.

Web & Frontend 22 stars 3 forks Updated 2 days ago MIT

Install

View on GitHub

Quality Score: 88/100

Stars 20%
45
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Astro Assets Production-ready image optimization and asset management with `astro:assets` in Astro 7. ## Agent Workflow (MANDATORY) Before ANY implementation, use `TeamCreate` to spawn 3 agents: 1. **fuse-ai-pilot:explore-codebase** - Analyze existing image usage and asset patterns 2. **fuse-ai-pilot:research-expert** - Verify astro:assets API via Context7/Exa 3. **mcp__context7__query-docs** - Check Astro 6 Fonts API and image component docs After implementation, run **fuse-ai-pilot:sniper** for validation. --- ## Overview ### When to Use - Displaying optimized images with automatic WebP/AVIF conversion - Building responsive images with multiple breakpoints - Loading remote images from external CDNs - Configuring custom fonts without layout shift - Generating OG images dynamically with Satori - Integrating Cloudinary or Imgix as image CDN ### Key Modules | Module | Exports | |--------|---------| | `astro:assets` | `<Image />`, `<Picture />`, `getImage()` | | `@astrojs/sharp` | Default image processing service | | Fonts API (stable, Astro 6.0+) | Built-in `fonts` config | --- ## Core Concepts ### Image Component `<Image />` automatically optimizes local and remote images. Always provide `alt`. Use `priority` for above-the-fold images. Defaults to WebP output. ### Picture Component `<Picture />` generates `<source>` elements for multiple formats. Use `formats={['avif', 'webp']}` for best compression with fallback. ### getImage() For server-side image gener...

Details

Author
fusengine
Repository
fusengine/agents
Created
6 months ago
Last Updated
2 days ago
Language
TypeScript
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category