This Claude Code skill automates the implementation of Astro’s optimized image handling patterns, ensuring developers use the <Image /> component or getImage() helper for all local assets. It focuses on improving Core Web Vitals by enforcing automatic compression, modern format conversion (WebP/Avif), and lazy loading. By automatically interpreting dimensions, the skill helps prevent Cumulative Layout Shift (CLS), making it an essential tool for developers building high-performance websites with the Astro framework.
主要功能
01Prevents Cumulative Layout Shift (CLS) by automating dimension calculation
02Ensures lazy-loading is applied to local assets by default
03Enforces the use of astro:assets for local image processing
04Provides implementation patterns for both local and remote image sources
050 GitHub stars
06Enables automatic image compression and conversion to WebP/Avif
使用场景
01Auditing Astro templates for performance and Core Web Vitals compliance
02Implementing responsive, optimized images in new Astro projects
03Refactoring legacy <img> tags to the optimized Astro Image component