
Image Optimization
Covers the essentials for getting images production-ready: format selection (WebP, AVIF, with JPEG fallbacks), responsive srcset implementation, and lazy loading patterns. Includes a Sharp-based build pipeline example and concrete performance targets like keeping hero images under 200KB. The checklist format makes it easy to audit existing sites. Use this when you're trying to shave seconds off page load times or when lighthouse is yelling at you about unoptimized images. The picture element examples are copy-paste ready, which saves you from looking up the syntax for the hundredth time.
- skills.sh installs
- 604
- GitHub stars
- 248
- last updated
- Aug 21, 2026
Install
$ npx -y skills add secondsky/claude-skills --skill image-optimization --agent claude-codeInstalls into .claude/skills of the current project.
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');
Sponsors
Promote your product hereReach 125k+ visitors monthlyPromote your product hereReach 125k+ visitors monthly
Agent CaffeineSponsoredClose your lid, come back to finished work
SnugSponsoredThe clipboard manager for the AI eraPromote your product hereReach 125k+ visitors monthly
WaxSponsoredBlock anything with supervision, without erasing your iPhonePromote your product hereReach 125k+ visitors monthly
knobsSponsoredSee your site on any phone, any day, in any language
Details
- Repository
- github.com/secondsky/claude-skills
- Categories
- Frontend Development, Debugging
- First seen
- Jun 3, 2026
More from secondsky/claude-skills
All 146- Rest Api Design600
- Mobile First Design598
- Web Performance Optimization576
- Inspira Ui572
- Api Authentication549
- Code Review548
- Web Performance Audit542
- Vulnerability Scanning534
- Kpi Dashboard Design526
- Progressive Web App523
- Tanstack Table513
- Architecture Patterns508
- Api Rate Limiting507
- Api Security Hardening506
- Better Auth502
- Design System Creation500
- React Composition Patterns494
- Api Contract Testing491
- React Native Skills490
- Technical Specification489
- Mobile App Testing480
- Api Design Principles479
- Frontend Design479
- Threejs477
Recommended
More Frontend Development1
wechat-miniprogramjoneqian/claude-skills-suiteWeChat Mini Program development framework. Use for building WeChat mini apps, WXML templates, WXSS styles, WXS scripting, component development, and WeChat API 599skills.sh installs
2
brewpage-publishkochetkov-ma/claude-brewcodePublish HTML, markdown, text, any file, or a multi-file site to brewpage.app — free hosting with no sign-up. Paste text, share a file, upload a site, or host a 598skills.sh installs
3
presentation-design-enhanceronewave-ai/claude-skillsTransform text-heavy slides into visual storytelling. Suggest layout improvements, icon usage, and data visualization.596skills.sh installs
4
latex-postersdavila7/claude-code-templatesCreate professional research posters in LaTeX using beamerposter, tikzposter, or baposter. Support for conference presentations, academic posters, and scientifi592skills.sh installs
5
stitch-sdk-usagegoogle-labs-code/stitch-sdkUse the Stitch SDK to generate, edit, and iterate on UI screens from text prompts, manage projects, and retrieve screen HTML/images. Use when the user wants to 576skills.sh installs
6
official-document-writercycleuser/skillsOfficial document writing assistant for Chinese government documents based on GB/T 9704-2012 standard. Triggers when: Writing Chinese official documents (公文), f573skills.sh installs