seo-images
它能做什么
这项技能审查网页上图片的 SEO 与速度表现。适合希望页面更快、图片描述更好的网站所有者。
适用场景
- ✓当你想检查页面上的所有图片是否都有有用的替代文字的时候。
- ✓当你想找出过大、拖慢页面速度的图片的时候。
- ✓当你想知道你的图片是否使用了 WebP 或 AVIF 等现代格式的时候。
技能链接
https://github.com/AgriciDaniel/claude-seo/blob/main/skills/seo-images/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请检查我首页上的图片,看看是否缺少替代文字,或文件是否过大。”
每周 5 个新技能,1 分钟读完。
工作原理
该技能读取页面中的图片标签,检查替代文字、文件大小、格式和加载设置,然后列出需要修复的图片并建议更好的格式。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Image Optimization Analysis
Checks
Alt Text
- Present on all
<img>elements (except decorative:role="presentation") - Descriptive: describes the image content, not "image.jpg" or "photo"
- Includes relevant keywords where natural, not keyword-stuffed
- Length: 10-125 characters
Good examples:
- "Professional plumber repairing kitchen sink faucet"
- "Red 2024 Toyota Camry sedan front view"
- "Team meeting in modern office conference room"
Bad examples:
- "image.jpg" (filename, not description)
- "plumber plumbing plumber services" (keyword stuffing)
- "Click here" (not descriptive)
File Size
Tiered thresholds by image category:
| Image Category | Target | Warning | Critical |
|---|---|---|---|
| Thumbnails | < 50KB | > 100KB | > 200KB |
| Content images | < 100KB | > 200KB | > 500KB |
| Hero/banner images | < 200KB | > 300KB | > 700KB |
Recommend compression to target thresholds where possible without quality loss.
Format
| Format | Browser Support | Use Case |
|---|---|---|
| WebP | 97%+ | Default recommendation |
| AVIF | 92%+ | Best compression, newer |
| JPEG | 100% | Fallback for photos |
| PNG | 100% | Graphics with transparency |
| SVG | 100% | Icons, logos, illustrations |
Recommend WebP/AVIF over JPEG/PNG. Check for <picture> element with format fallbacks.
Recommended <picture> Element Pattern
Use progressive enhancement with the most efficient format first:
<picture>
<source srcset="image.avif" type="image/avif">
<source srcset="image.webp" type="image/webp">
<img src="image.jpg" alt="Descriptive alt text" width="800" height="600" loading="lazy" decoding="async">
</picture>
The browser will use the first supported format. Global browser support (caniuse.com, checked 2026-09-28): AVIF about 95.4%, WebP about 96.8%. Re-check caniuse before quoting.
JPEG XL: Emerging Format
Third-party reporting and Wikipedia describe a Rust-based JPEG XL decoder as shipped in Chrome 145 stable (2026-02-10) behind the chrome://flags/#enable-jxl-image-format flag, not enabled by default; no Google-owned confirmation was retrieved in the fact pack. Because default support is not confirmed, it is not yet practical for production web delivery. Keep serving AVIF/WebP with JPEG fallback and monitor.
Responsive Images
srcsetattribute for multiple sizessizesattribute matching layout breakpoints- Appropriate resolution for device pixel ratios
<img
src="image-800.jpg"
srcset="image-400.jpg 400w, image-800.jpg 800w, image-1200.jpg 1200w"
sizes="(max-width: 600px) 400px, (max-width: 1200px) 800px, 1200px"
alt="Description"
>
Lazy Loading
loading="lazy"on below-fold images- Do NOT lazy-load above-fold/hero images (hurts LCP)
- Check for native vs JavaScript-based lazy loading
<!-- Below fold - lazy load -->
<img src="photo.jpg" loading="lazy" alt="Description">
<!-- Above fold - eager load (default) -->
<img src="hero.jpg" alt="Hero image">
Detected lazy-loader methods (lazy_method field)
"${CLAUDE_PLUGIN_ROOT}/scripts/claude-seo" run parse_html.py classifies each image's lazy-loading mechanism via the
lazy_method field on every image entry. Five values:
lazy_method |
Signal detected | Common stack |
|---|---|---|
native |
loading="lazy" HTML attribute |
Modern browsers, plain HTML |
perfmatters |
data-perfmatters-src/-srcset OR class perfmatters-lazy |
WordPress + Perfmatters plugin |
ewww |
data-ewww-src / data-eio OR class lazyload-eio |
WordPress + EWWW Image Optimizer |
js-generic |
data-src / data-lazy-src / data-original / data-srcset OR class lazyload/lazyloaded/lazy |
Lazysizes, vanilla-lazyload, jQuery plugins |
none |
Neither attribute nor class signal | Page is not lazy-loading this image |
When auditing image SEO, report lazy_method alongside loading so users know
whether their site is using a JS-driven lazy-loader (in which case the native
loading="lazy" attribute is intentionally absent, that is not a regression).
fetchpriority="high" for LCP Images
Add fetchpriority="high" to your hero/LCP image to prioritize its download in the browser's network queue:
<img src="hero.webp" fetchpriority="high" alt="Hero image description" width="1200" height="630">
Critical: Do NOT lazy-load above-the-fold/LCP images. Using loading="lazy"
常见问题
什么样的替代文字才好?
该技能建议替代文字控制在 10 到 125 个字符之间,描述图片内容,并避免堆砌关键词。
它推荐哪些文件格式?
对于大多数图片,它推荐 WebP 或 AVIF 而不是 JPEG 或 PNG,并在需要时提供备用格式。
它能检查图片排名吗?
能。如果连接了 DataForSEO 工具,它可以检查图片搜索排名。
详情
作者的原始描述
Image optimization analysis for SEO and performance. Checks alt text, file sizes, formats, responsive images, lazy loading, CLS prevention, image SERP rankings (via DataForSEO), and image file optimization (WebP/AVIF conversion, IPTC/XMP metadata injection). Use when user says "image optimization", "alt text", "image SEO", "image size", "image audit", "optimize images", "image metadata", "image SERP", "convert to webp", or "image file optimize".
repo: AgriciDaniel/claude-seo
热度
- GitHub 星标
- 26k
- 排名
- #10009
- 许可证
- MIT
- 更新时间
- 2026/11/1
评论
- …
同一仓库的更多技能
seo-ahrefs
26k让你的智能体获取网站的实时 Ahrefs 数据,包括反向链接、引荐域名、自然关键词和内容创意。需要 Ahrefs API 令牌。
seo-image-gen
26k帮你的智能体使用 Gemini 制作 SEO 图片,例如社交预览卡片、博客头图和信息图。需要先安装 banana 扩展。
seo-bing
26k帮你的智能体检查 Bing Webmaster Tools 数据,并通过 IndexNow 提交新页面网址,帮助 Bing 发现你的页面。
seo-dataforseo
26k让你的智能体从 DataForSEO 获取实时 SEO 数据,例如搜索结果、关键词搜索量、反向链接和 AI 提及情况。每次调用都会由服务商计费。