
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-codeInstalls 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- Ruby Rails Application660
- Api Rate Limiting647
- Internationalization I18n642
- Information Architecture641
- Backup Disaster Recovery626
- Github Actions Workflow626
- Color Accessibility624
- Fastapi Development624
- Static Code Analysis622
- Unit Testing Framework622
- Aws Lambda Functions619
- User Research Analysis618
- Vulnerability Scanning617
- Data Encryption616
- Api Authentication612
- Performance Testing609
- Competitor Analysis608
- Refactor Legacy Code608
- Security Testing607
- Frontend Accessibility604
- Design Patterns Implementation600
- Database Schema Design597
- Aws S3 Management595
- Database Query Optimization593