# Sharp Image Optimization Pipeline

> Batches image resizing, WebP/AVIF format transcoding, and metadata stripping using the Node.js Sharp library. Use when optimizing responsive web images for Core

- Skill: `bishnucd/sharp-image-optimization-pipeline` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx get-skill add bishnucd/sharp-image-optimization-pipeline`
- Raw SKILL.md: https://api.skillmd.com/api/skills/bishnucd/sharp-image-optimization-pipeline/raw
- Safety review: pending
- Works with: any agent that reads SKILL.md (Claude Code, Claude.ai, Cursor, Codex, Windsurf, 60+ more)
- Category: Coding & Dev Tools
- Author: Bishnucd (https://skillmd.com/u/bishnucd)
- Updated: 2026-12-03
- Page: https://skillmd.com/skills/bishnucd/sharp-image-optimization-pipeline

---

---
name: sharp-image-optimization-pipeline
description: Batches image resizing, WebP/AVIF format transcoding, and metadata stripping using the Node.js Sharp library. Use when optimizing responsive web images for Core Web Vitals.
license: MIT
metadata:
  author: Community List Maintainers
  version: "1.0.0"
  source: "https://sharp.pixelplumbing.com/"
---
# Sharp Image Optimization Pipeline

## Overview
Heavy JPEG/PNG images cause poor Largest Contentful Paint (LCP) scores. Sharp leverages libvips to resize, compress, and transcode images to modern AVIF/WebP formats up to 5x faster than ImageMagick.

## Operational Workflow

1. **Read source image stream and extract dimensions and EXIF orientation metadata.**:
   - Read source image stream and extract dimensions and EXIF orientation metadata.

2. **Generate responsive breakpoint sizes (width**:
   - Generate responsive breakpoint sizes (width: 480, 768, 1200, 1920) preserving aspect ratio.

3. **Transcode to modern formats**:
   - Transcode to modern formats: AVIF (quality: 75) and WebP fallback (quality: 80).

4. **Strip unnecessary EXIF and GPS metadata to protect privacy and shave extra bytes.**:
   - Strip unnecessary EXIF and GPS metadata to protect privacy and shave extra bytes.

## Recommended Tools & Environments
- Node.js
- Sharp / libvips
- WebP / AVIF
- TypeScript

## Verification & Execution Criteria
- Pre-execution validation verifies all prerequisites and inputs.
- Step-by-step progress logging confirms intermediate state transitions.
- Post-execution checks verify output integrity and clean exit codes.

