# Image Pipeline

> Run Portable Web Toolkit image-pipeline to convert eligible rasters to WebP and enforce media format discipline on toolkit-managed sites. Use when optimizing photographic or raster assets.

- Skill: `imyourboyroy/image-pipeline` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add imyourboyroy/image-pipeline`
- Raw SKILL.md: https://api.skillmd.com/api/skills/imyourboyroy/image-pipeline/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: DevOps & Infra
- Author: ImYourBoyRoy (https://skillmd.com/u/imyourboyroy)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/imyourboyroy/image-pipeline

---


# Image Pipeline

```bash
node ./Web_Toolkit/image_pipeline/bin/image-pipeline.mjs --help
```

## Rules

1. **Default:** Astro `Image` / `Picture` from `astro:assets` for content photos (masters in `src/assets/`). Prefer `OptimizedPicture.astro` with `formats={['avif','webp']}`. Workers: `cloudflare({ imageService: 'compile' })`.
2. **Gap-fill only:** run this CLI on **`public/`** JPG/PNG leftovers that bypass Astro (not imported assets).
3. Prefer WebP (default optimize); optional `--format avif|both` when Pillow supports AVIF.
4. Do not overwrite source masters without approval.
5. Record asset conventions in client `MEMORY.md` when introduced.

```bash
node ./Web_Toolkit/image_pipeline/bin/image-pipeline.mjs audit --project-root .
node ./Web_Toolkit/image_pipeline/bin/image-pipeline.mjs optimize --project-root . --apply --replace-references
```



