What problem does it solve?
This Skill addresses the challenges of adding, managing, and working with images and media galleries across various web projects.
Core Features & Use Cases
- Image Handling: Offers patterns for image sources, placeholders, and lists with images.
- Gallery Patterns: Supports grid and masonry galleries with featured images.
- Accessibility: Ensures all images have meaningful alt text, and decorative images are marked as such.
- Width Specification: Encourages pixel-based width specification for performance.
- Common Patterns: Provides patterns for hero images, profile avatars, card images, and background images.
- Prohibited Sources: Restricts the use of external image sources, promoting user-provided and CMS image URLs.
- Image Loading Best Practices: Offers guidance on lazy loading and priority image loading.
- Aspect Ratios: Utilizes aspect ratio utilities for consistent image containers.
Quick Start
Use the image-work skill to add a hero image to your website with the following code snippet:
const IMAGE_PLACEHOLDER = "https://static.wixstatic.com/media/12d367_71ebdd7141d041e4be3d91d80d4578dd~mv2.png";
<Image
src={`${IMAGE_PLACEHOLDER}?id=hero-background`}
alt="Beautiful landscape background"
width={1920}
className="w-full h-full object-cover"
/>