From image-production
Use when the user wants to resize a large batch of images (>500 files) where ImageMagick throughput is the bottleneck. Wraps libvips for 5–10× faster batch resize at lower memory. Falls back to ImageMagick if `vips` isn't installed. Same outputs as `batch-resize` — different engine.
npx claudepluginhub danielrosehill/claude-code-plugins --plugin image-productionThis skill uses the workspace's default tool permissions.
Batch image resize using libvips. Material throughput improvement over ImageMagick on large libraries — typical 5–10× speed-up and lower peak memory.
Guides Next.js Cache Components and Partial Prerendering (PPR): 'use cache' directives, cacheLife(), cacheTag(), revalidateTag() for caching, invalidation, static/dynamic optimization. Auto-activates on cacheComponents: true.
Guides building MCP servers enabling LLMs to interact with external services via tools. Covers best practices, TypeScript/Node (MCP SDK), Python (FastMCP).
Share bugs, ideas, or general feedback.
Batch image resize using libvips. Material throughput improvement over ImageMagick on large libraries — typical 5–10× speed-up and lower peak memory.
Do not use this skill for:
batch-resize is fine, no point swapping engines.--width N — resize so width = N, height auto.--height N — resize so height = N, width auto.--max NxM — fit within NxM box (preserves aspect).--exact NxM — force exact dimensions (may distort or crop).in-place (overwrite) or --output-dir <path> (default: <input>/resized/).lanczos3 (default — best quality), cubic, linear, nearest.--recursive to descend into subdirectories. Default: top-level only.--to <ext> to change format on the way out.Verify vips is on PATH. If missing, fall back to ImageMagick convert with the same parameters and warn that this will be slower (point at install-deps).
Enumerate input files (filter to image extensions: jpg, jpeg, png, webp, tiff, gif, heic, avif, jxl).
For each file, build the vips command. Two main forms:
Fit within box (preserves aspect):
vipsthumbnail "<input>" --size "<W>x<H>" --output "<output>[Q=85]"
vipsthumbnail is the right tool for "resize down" — it's optimised for thumbnail-style ops and handles JPEG shrink-on-load (free 8× speedup for 1/8-size targets).
Exact resize via vips:
vips resize "<input>" "<output>" <scale-factor> --kernel <kernel>
For --width/--height, compute scale = target / source. vipsthumbnail is preferred when shrinking; use vips resize when upscaling or when source dimensions vary widely.
Run in parallel where safe. vips is internally threaded; running multiple processes via xargs/parallel adds little. One process per CPU core is the sweet spot for large batches.
Report progress every N files (every 10% or every 100, whichever is more frequent).
<n> files processed, <total-input-MB>MB → <total-output-MB>MB, <elapsed-s>s, avg <ms>ms/image.--recursive flattening logic, flag the collision.vipsthumbnail accepts [Q=N] syntax for JPEG quality on output (default 75; 85 is a good balance).libvips-tools includes libheif and libjxl on recent Ubuntu).vips is missing, run convert "<input>" -resize <WxH> "<output>" per file. Same output, slower.