Processing Images
Installation
SKILL.md
Processing Images
Quick Start
import sharp from 'sharp';
// Resize and optimize for web
async function optimizeImage(inputPath: string, outputPath: string): Promise<void> {
await sharp(inputPath)
.resize(1200, 1200, { fit: 'inside', withoutEnlargement: true })
.webp({ quality: 80 })
.toFile(outputPath);
}