Overview of unpic-img features
mainunpic-img is a multi-framework component designed for responsive, high-performance images using existing image CDNs or CMSs without requiring a build step.
Key features include:
- Native HTML: Generates a single
<img />tag with no extra wrapper elements or runtime JavaScript, making it easy to style. - Automatic Responsiveness: Automatically generates correct
srcsetandsizesattributes. - Layout Management: Handles
fixed,constrained, andfull widthlayouts while preserving aspect ratio to avoid layout shift. - Performance Optimizations: Uses native lazy loading (
loading="lazy"), async decoding (decoding="async"), and high priority fetching for important images. - Modern Formats: Delivers WebP and AVIF if supported by the browser.
- CDN Integration: Uses unpic to support major CDNs and CMSs like Cloudinary, Imgix, Contentful, and Shopify.