What problem does it solve?
This Skill addresses the challenge of serving appropriately sized and formatted images across different devices and network conditions, preventing layout shifts and improving Core Web Vitals.
Core Features & Use Cases
- Responsive Sizing: Implements
srcset and sizes for optimal image selection.
- Modern Formats: Utilizes
<picture> with AVIF and WebP for reduced file sizes.
- Art Direction: Provides different image crops for various viewports.
- Loading Strategies: Implements
loading="lazy" and fetchpriority="high" for LCP optimization.
- CLS Prevention: Ensures space is reserved using
width/height or aspect-ratio.
- Use Case: When adding images to a website, especially hero images or product photos, to ensure fast loading, prevent layout shifts, and reduce bandwidth consumption.
Quick Start
Implement responsive images for the main hero banner using AVIF, WebP, and JPEG formats with appropriate sizes and lazy loading.