Plan and run a media pipeline for images, video, and downloadable assets. Use this skill when designing image storage and delivery, choosing formats (WebP, AVIF), setting up responsive images, picking a video host, organizing a brand asset library, or auditing a slow image pipeline. Triggers on image pipeline, asset library, DAM, image optimization, WebP, AVIF, responsive images, video hosting, image CDN, asset workflow, media management. Also triggers when images are slow, broken, or scattered across systems.
72
88%
Does it follow best practices?
Impact
—
No eval scenarios have been run
Passed
No known issues
Design how images, video, and downloadable files get stored, processed, organized, and served. Stack-agnostic. The principles apply whether you're running a custom pipeline or using a hosted service.
performance-optimization)brand-identity, art-direction)content-strategy)performance-optimization)The media pipeline has four stages. Each has its own decisions.
Where assets enter the system.
Sources:
At source, decide:
Anti-pattern: sources and delivered assets in the same place. Hard to find masters. Hard to regenerate. Hard to audit usage.
Transforming source files into delivery formats.
Processing decisions:
Process options:
For sites with many image variants and ongoing change, on-demand wins. For tightly controlled marketing sites, build-time can be simpler.
Getting assets to users efficiently.
Delivery decisions:
<picture> element or content negotiation.srcset and sizes attributes so browsers pick the right size for the viewport.loading="lazy" for below-the-fold images.decoding="async" for non-critical images.Modern HTML pattern:
<img
src="/image-1280.jpg"
srcset="/image-640.jpg 640w, /image-960.jpg 960w, /image-1280.jpg 1280w, /image-1920.jpg 1920w"
sizes="(max-width: 768px) 100vw, 50vw"
width="1280"
height="720"
loading="lazy"
decoding="async"
alt="Descriptive alt text">Or for format negotiation:
<picture>
<source type="image/avif" srcset="/image.avif">
<source type="image/webp" srcset="/image.webp">
<img src="/image.jpg" alt="Descriptive alt text" width="1280" height="720">
</picture>Keeping the system organized and useful over time.
Management decisions:
A simple shared folder works at low scale. A real DAM is necessary above a few thousand assets or with multiple teams.
For typical web use:
| Format | Use for | Avoid for |
|---|---|---|
| AVIF | Photographs, complex images. Best compression. | Browser support edge cases (rare in 2026, ubiquitous now) |
| WebP | Photographs, illustrations. Good compression. Wide support. | Print, archival |
| JPEG | Photographs (fallback). Universal support. | Sharp-edged graphics, transparent backgrounds |
| PNG | Sharp-edged graphics, transparent backgrounds, screenshots. Lossless. | Photographs (file size) |
| SVG | Logos, icons, simple illustrations. Scalable. | Photographs, complex art |
| GIF | Effectively obsolete. Use video formats for animation. | Anything modern |
| MP4 (H.264) | Video, universal support. | Static content |
| WebM (VP9 / AV1) | Video, better compression. | Older browsers |
For most sites: serve AVIF/WebP for modern browsers, JPEG/PNG fallback. SVG for vector. MP4 for video.
What assets exist? Where? In what state?
For a sample of pages:
Tools: Lighthouse, WebPageTest, your CDN's analytics.
Three reasonable patterns:
Pattern A: Static, build-time
Pattern B: Image CDN with on-demand
Pattern C: Headless CMS with built-in image API
The patterns aren't mutually exclusive. Big sites often use Pattern A for design assets, Pattern B for content images.
Document:
Make these enforceable through tooling where possible (CI checks on file sizes, alt text required by CMS).
For each source type:
| Source | Workflow |
|---|---|
| Designer | Export from Figma, drop into bucket, automated processing handles the rest |
| Writer | Upload through CMS, CMS prompts for alt text |
| Photographer | RAW into source bucket, designer or automation creates web variants |
| User upload | Pass through the image service, automatic moderation if applicable |
Document who does what. Workflows that aren't documented break.
For all but the smallest sites:
A pipeline document covers:
Source files in the delivery bucket. 50MB RAW files served to users. Fix: separate sources from delivered.
Single image format for every browser. JPEG-only when AVIF could be 30-50% smaller. Use format negotiation.
Missing width and height attributes. Causes layout shift, hurts CLS metric. Set always.
Lazy loading hero images. Above-the-fold images shouldn't be lazy-loaded. Lazy below the fold.
Eager loading everything. All images load on page load. Use loading="lazy" for below-fold.
No responsive images. Mobile gets the desktop image. Wasteful, slow. Use srcset and sizes.
One source resolution. Source is the delivery resolution. Can't generate retina or larger. Source should be 2-3x the largest delivered size.
Stripping all metadata. Removes alt text, removes attribution. Strip GPS and personal EXIF; keep semantic metadata.
Random naming. IMG_4823.jpg, Screenshot 2024-03-15.png. Hard to find later. Use a naming convention.
No alt text. Accessibility failure, SEO failure. Make alt text required at upload.
Storage growing unbounded. Old, unused assets pile up. Quarterly cleanup or automated lifecycle policies.
One person knows the pipeline. When they're out, no one can fix issues or onboard new sources. Document.
A media pipeline document includes:
references/responsive-image-patterns.md: Copy-paste HTML patterns for common responsive image scenarios (hero, content, art-directed, format negotiation), with explanations.8e70d03
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.