What problem does it solve?
This Skill helps you implement performant responsive images, ensuring optimal loading times and visual quality across all devices by leveraging modern formats and best practices.
Core Features & Use Cases
- Responsive Sizing: Automatically generates
srcset and sizes attributes for efficient image delivery.
- Modern Formats: Supports WebP and AVIF with fallbacks for broader browser compatibility.
- Lazy Loading: Implements native lazy loading for below-the-fold images to improve initial page load.
- CLS Prevention: Ensures images have dimensions or aspect-ratio containers to prevent layout shifts.
- Art Direction: Enables serving different image crops for different screen sizes using the
<picture> element.
- Use Case: When adding a hero image to a webpage, use this Skill to ensure it loads quickly on mobile devices using AVIF format, scales correctly, and doesn't cause layout shifts, while providing a JPEG fallback for older browsers.
Quick Start
Implement a responsive image using the responsive-images skill, providing the base image source, an array of different widths, and the sizes attribute.