aj-geddes avatar

Image Optimization

Covers the essentials for getting images web-ready: choosing between JPEG, PNG, WebP, and SVG based on content type, compressing with tools like ImageMagick and cwebp, and implementing responsive images with srcset. The reference guides walk through the full optimization pipeline from format selection to monitoring. Honestly, images are still half of most page weights, so this is baseline stuff you should be doing before any site goes live. The Quick Start gives you the actual commands to run, which beats digging through documentation when you just need to batch-process a directory of photos.

skills.sh installs
662
GitHub stars
379
last updated
Aug 21, 2026

Install

$ npx -y skills add aj-geddes/useful-ai-prompts --skill image-optimization --agent claude-code

Installs into .claude/skills of the current project.

Files

Image Optimization

Table of Contents

Overview

Images typically comprise 50% of page weight. Optimization dramatically improves performance, especially on mobile networks.

When to Use

  • Website optimization
  • Responsive image implementation
  • Performance improvement
  • Mobile experience enhancement
  • Before deployment

Quick Start

Minimal working example:

Format Selection:

JPEG:
  Best for: Photographs, complex images
  Compression: Lossy (quality 70-85)
  Size: ~50-70% reduction
  Tools: ImageMagick, TinyJPEG
  Command: convert image.jpg -quality 75 optimized.jpg

PNG:
  Best for: Icons, screenshots, transparent images
  Compression: Lossless
  Size: 10-30% reduction
  Tools: PNGQuant, OptiPNG
  Command: optipng -o3 image.png

WebP:
  Best for: Modern browsers (90% support)
  Compression: 25-35% better than JPEG/PNG
  Fallback: Use <picture> element
  Tools: cwebp
  Command: cwebp -q 75 image.jpg -o image.webp

Sponsors

Details

Repository
github.com/aj-geddes/useful-ai-prompts
Categories
Frontend Development, Code Review & Quality, AI & Agent Building
First seen
Jun 3, 2026

More from aj-geddes/useful-ai-prompts

All 258
1motion-team avatarhook-writingmotion-team/creative-strategy-skillsWrites high-converting, psychologically-driven hooks for paid ads, TikTok, Instagram Reels, and organic content. Use this whenever a user wants to write hooks, 653skills.sh installs
2patternsdev avatarobserver-patternpatternsdev/skillsTeaches the observer pattern for event-driven communication. Use when you need decoupled publish/subscribe behavior where multiple parts of your system react to653skills.sh installs
3wangyendt avatarsend-emailwangyendt/wayne-skillsSend emails via SMTP with support for HTML formatting, file attachments, and email templates. Use when users ask to: (1) Send an email, (2) Email someone, (3) S652skills.sh installs
4hairyf avatarundocshairyf/skillsMinimal Documentation Theme and CLI for shared usage across UnJS projects. Use when creating documentation sites with Nuxt, Nuxt Content, and Nuxt UI.632skills.sh installs
5dash0hq avatarotel-ottldash0hq/agent-skillsOpenTelemetry Transformation Language (OTTL) expert. Use when writing or debugging OTTL expressions for any OpenTelemetry Collector component that supports OTTL631skills.sh installs
6sanky369 avatarsocial-graphicssanky369/vibe-building-skillsProduce platform-correct social media graphics: pick the right dimensions and layout per platform, write the headline/body/CTA copy, build the generation prompt629skills.sh installs