plugins/astro-expert/skills/astro-assets/SKILL.md
Image and asset optimization in Astro 6 — <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.
npx skillsauth add fusengine/agents astro-assetsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Production-ready image optimization and asset management with astro:assets in Astro 6.
Before ANY implementation, use TeamCreate to spawn 3 agents:
After implementation, run fuse-ai-pilot:sniper for validation.
| Module | Exports |
|--------|---------|
| astro:assets | <Image />, <Picture />, getImage() |
| @astrojs/sharp | Default image processing service |
| Fonts API (Astro 6) | Built-in experimental.fonts config |
<Image /> automatically optimizes local and remote images. Always provide alt. Use priority for above-the-fold images. Defaults to WebP output.
<Picture /> generates <source> elements for multiple formats. Use formats={['avif', 'webp']} for best compression with fallback.
For server-side image generation (API routes, CSS background images). Returns { src, attributes } object.
Built-in font optimization via experimental.fonts in astro.config.mjs. Zero layout shift, automatic preloading, supports Google Fonts and local fonts.
| Topic | Reference | When to Consult | |-------|-----------|-----------------| | Image Component | image-component.md | Local/remote image display | | Responsive Images | picture-responsive.md | Multi-format, srcset, sizes | | Remote Images | remote-images.md | External URLs, inferSize | | Fonts API | fonts-api.md | Zero-CLS font loading | | OG with Satori | og-satori.md | Dynamic OG image generation | | CDN Integration | cdn-integration.md | Cloudinary, Imgix setup |
| Template | When to Use | |----------|-------------| | image-setup.md | Full image optimization setup | | og-image-route.md | Dynamic OG image API route |
alt - Required for accessibility and SEOpriority for LCP - Above-the-fold images load eagerlyinferSize for remote - Avoids layout shift without known dimensionsdevelopment
Use when optimizing entity-based / semantic SEO 2026. Covers entity maps, Google Knowledge Graph resolution, salience scoring, passage-level ranking, about/sameAs/knowsAbout schema, Cloud Natural Language API validation.
development
Use when running SEO, GEO, schema, Core Web Vitals, sitemap, hreflang, E-E-A-T, AI Overviews, technical SEO, or structured data tasks. Covers full-site audits, single-page analysis, schema markup, content quality, AI search optimization, local SEO, sitemap/robots, internal linking, semantic clustering, and search experience.
development
Use when optimizing search experience (SXO). Covers intent matching, user personas, user stories, page-type analysis, dwell time, scroll depth, pogo-sticking prevention.
development
Use when optimizing local SEO. Covers Google Business Profile, NAP consistency, citations, reviews acquisition, Local Pack ranking, location pages, LocalBusiness schema.