Image Optimization
Practical image optimization guide covering format choice, responsive markup, lazy loading, and build-time compression.
- CCM score
- 54 of 100
- skills.sh installs
- 618
- GitHub stars
- 257
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers format selection among JPEG, PNG, WebP, AVIF, and SVG with approximate compression savings for each
- Includes a
<picture>responsive markup example with AVIF and WebP sources,srcsetwidths, andsizeshints - Shows native
loading="lazy"and a blur-placeholder pattern, plus a Sharp resize-and-WebP build script - Sets size targets for hero images, thumbnails, and total page images, and a checklist for production deployment
Install
$ npx -y skills add secondsky/claude-skills --skill image-optimization -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Image Optimization
Optimize images for web performance with modern formats and responsive techniques.
Format Selection
| Format | Best For | Compression |
|---|---|---|
| JPEG | Photos | Lossy, 50-70% reduction |
| PNG | Icons, transparency | Lossless, 10-30% |
| WebP | Modern browsers | 25-35% better than JPEG |
| AVIF | Next-gen | 50% better than JPEG |
| SVG | Logos, icons | Vector, scalable |
Responsive Images
<picture>
<source srcset="image.avif" type="image/avif">
<source srcset="image.webp" type="image/webp">
<img
src="image.jpg"
srcset="image-400.jpg 400w, image-800.jpg 800w, image-1200.jpg 1200w"
sizes="(max-width: 600px) 100vw, 50vw"
alt="Description"
loading="lazy"
decoding="async"
>
</picture>
Lazy Loading
<!-- Native lazy loading -->
<img src="image.jpg" loading="lazy" alt="Description">
<!-- With blur placeholder -->
<img
src="placeholder-blur.jpg"
data-src="image.jpg"
class="lazy"
alt="Description"
>
Build Pipeline (Sharp)
const sharp = require('sharp');
Details
- Repository
- github.com/secondsky/claude-skills
- Categories
- Frontend & UI Code, Browser Automation & Scraping
- First seen
- Jun 3, 2026
Questions
What does the image-optimization skill do?
The image-optimization skill optimizes images for web performance using modern formats like WebP and AVIF, responsive srcset techniques, and lazy loading. It also covers a Sharp build pipeline for resizing and compressing assets before production deployment.
How do I install the image-optimization skill?
Run npx -y skills add secondsky/claude-skills --skill image-optimization -y in your project to install the image-optimization skill. Once installed, the agent can apply its format selection, responsive image markup and lazy loading guidance to your pages.
When should I use the image-optimization skill?
Use the image-optimization skill when you are improving page load times, implementing responsive images, or preparing assets for production deployment. Its checklist covers WebP with JPEG fallback, responsive srcset, lazy loading below the fold, quality 70 to 85 compression and cache headers.
Which image formats and size targets does the image-optimization skill recommend?
The image-optimization skill recommends WebP with JPEG fallback for photos, PNG for icons needing transparency, and SVG for logos. Its size targets are under 200KB for a hero image, under 30KB for a thumbnail and under 500KB for total images on a page.
Where does the image-optimization skill sit in its category?
The image-optimization skill is listed in the Frontend and UI Code category on Claude Marketplaces. It covers image formats, responsive markup and build-time compression, which differs from the React and design guidance of its neighbors.
More from secondsky/claude-skills
All 116- Rest Api Design609
- Web Performance Optimization594
- Inspira Ui585
- Web Performance Audit563
- Api Authentication561
- Code Review558
- Progressive Web App554
- Vulnerability Scanning545
- Kpi Dashboard Design543
- Bun Sqlite540
- Bun Sveltekit524
- Tanstack Table524
- Api Security Hardening522
- Architecture Patterns521
- Api Rate Limiting517
- Design System Creation515
- Threejs509
- React Composition Patterns504
- Api Contract Testing500
- Technical Specification500
- React Native Skills499
- Mobile App Testing491
- Csrf Protection487
- Ml Model Training487
Similar to Image Optimization
More Frontend & UI Codeweb-performance-optimizationSkillsecondsky/claude-skills594 installsReference guide for web performance work: code splitting, lazy loading, caching, compression, and Core Web Vitals tracking.
seo-imagesSkillagricidaniel/claude-seo8.2K installsImage optimization audit covering alt text, file sizes, formats, responsive images, lazy loading, and CLS prevention.
html-to-imageSkillhtml2png/skills273 installsTurns HTML/CSS into PNG, WebP, or PDF images through the html2png.dev API, with pixel-precise typography and layout.
responsive-web-designSkillsecondsky/claude-skills728 installsMobile-first CSS guide that builds adaptive layouts with Flexbox, Grid, media queries, and fluid type.
DarkroomMCP serversathergate97 starsImage processing pipeline for Next.js: responsive resizing and optimization through Sharp.