[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-6a03d045-0f74-4065-9ec5-3fe0788ac4ec":3,"$fdGyxmz4A7U_AD0QiXcZC68R-D1vGkf3VBZWdHRpat4I":42},{"id":4,"title":5,"description":6,"categoryId":7,"moduleId":8,"tags":9,"prompt":10,"icon":11,"source":12,"sourceUrl":13,"authorId":14,"authorName":15,"isPublic":16,"stars":17,"runs":18,"createdAt":19,"updatedAt":19,"module":20,"category":27,"packages":33},"6a03d045-0f74-4065-9ec5-3fe0788ac4ec","seo-images","> 这段文本为空，无法进行翻译。","cat_writing_article","mod_writing","sickn33,writing","---\nname: seo-images\ndescription: >\n  Image optimization analysis for SEO and performance. Checks alt text, file\n  sizes, formats, responsive images, lazy loading, and CLS prevention. Use when\n  user says \"image optimization\", \"alt text\", \"image SEO\", \"image size\",\n  or \"image audit\".\nrisk: safe\nsource: \"https:\u002F\u002Fgithub.com\u002FAgriciDaniel\u002Fclaude-seo\"\ndate_added: \"2026-03-21\"\nuser-invokable: true\nargument-hint: \"[url]\"\nallowed-tools:\n  - Read\n  - Grep\n  - Glob\n  - Bash\n  - WebFetch\n---\n\n# Image Optimization Analysis\n\n## When to Use\n- Use when auditing image SEO, alt text, file sizes, formats, or lazy loading.\n- Use when the user wants image-specific performance recommendations.\n- Use when checking media quality signals that affect both SEO and Core Web Vitals.\n\n## Checks\n\n### Alt Text\n- Present on all `\u003Cimg>` elements (except decorative: `role=\"presentation\"`)\n- Descriptive: describes the image content, not \"image.jpg\" or \"photo\"\n- Includes relevant keywords where natural, not keyword-stuffed\n- Length: 10-125 characters\n\n**Good examples:**\n- \"Professional plumber repairing kitchen sink faucet\"\n- \"Red 2024 Toyota Camry sedan front view\"\n- \"Team meeting in modern office conference room\"\n\n**Bad examples:**\n- \"image.jpg\" (filename, not description)\n- \"plumber plumbing plumber services\" (keyword stuffing)\n- \"Click here\" (not descriptive)\n\n### File Size\n\n**Tiered thresholds by image category:**\n\n| Image Category | Target | Warning | Critical |\n|----------------|--------|---------|----------|\n| Thumbnails | \u003C 50KB | > 100KB | > 200KB |\n| Content images | \u003C 100KB | > 200KB | > 500KB |\n| Hero\u002Fbanner images | \u003C 200KB | > 300KB | > 700KB |\n\nRecommend compression to target thresholds where possible without quality loss.\n\n### Format\n| Format | Browser Support | Use Case |\n|--------|-----------------|----------|\n| WebP | 97%+ | Default recommendation |\n| AVIF | 92%+ | Best compression, newer |\n| JPEG | 100% | Fallback for photos |\n| PNG | 100% | Graphics with transparency |\n| SVG | 100% | Icons, logos, illustrations |\n\nRecommend WebP\u002FAVIF over JPEG\u002FPNG. Check for `\u003Cpicture>` element with format fallbacks.\n\n#### Recommended `\u003Cpicture>` Element Pattern\n\nUse progressive enhancement with the most efficient format first:\n\n```html\n\u003Cpicture>\n  \u003Csource srcset=\"image.avif\" type=\"image\u002Favif\">\n  \u003Csource srcset=\"image.webp\" type=\"image\u002Fwebp\">\n  \u003Cimg src=\"image.jpg\" alt=\"Descriptive alt text\" width=\"800\" height=\"600\" loading=\"lazy\" decoding=\"async\">\n\u003C\u002Fpicture>\n```\n\nThe browser will use the first supported format. Current browser support: AVIF 93.8%, WebP 95.3%.\n\n#### JPEG XL: Emerging Format\n\nIn November 2025, Google's Chromium team reversed its 2022 decision and announced it will restore JPEG XL support in Chrome using a Rust-based decoder. The implementation is feature-complete but not yet in Chrome stable. JPEG XL offers lossless JPEG recompression (~20% savings with zero quality loss) and competitive lossy compression. Not yet practical for web deployment, but worth monitoring for future adoption.\n\n### Responsive Images\n- `srcset` attribute for multiple sizes\n- `sizes` attribute matching layout breakpoints\n- Appropriate resolution for device pixel ratios\n\n```html\n\u003Cimg\n  src=\"image-800.jpg\"\n  srcset=\"image-400.jpg 400w, image-800.jpg 800w, image-1200.jpg 1200w\"\n  sizes=\"(max-width: 600px) 400px, (max-width: 1200px) 800px, 1200px\"\n  alt=\"Description\"\n>\n```\n\n### Lazy Loading\n- `loading=\"lazy\"` on below-fold images\n- Do NOT lazy-load above-fold\u002Fhero images (hurts LCP)\n- Check for native vs JavaScript-based lazy loading\n\n```html\n\u003C!-- Below fold - lazy load -->\n\u003Cimg src=\"photo.jpg\" loading=\"lazy\" alt=\"Description\">\n\n\u003C!-- Above fold - eager load (default) -->\n\u003Cimg src=\"hero.jpg\" alt=\"Hero image\">\n```\n\n### `fetchpriority=\"high\"` for LCP Images\n\nAdd `fetchpriority=\"high\"` to your hero\u002FLCP image to prioritize its download in the browser's network queue:\n\n```html\n\u003Cimg src=\"hero.webp\" fetchpriority=\"high\" alt=\"Hero image description\" width=\"1200\" height=\"630\">\n```\n\n**Critical:** Do NOT lazy-load above-the-fold\u002FLCP images. Using `loading=\"lazy\"` on LCP images directly harms LCP scores. Reserve `loading=\"lazy\"` for below-the-fold images only.\n\n### `decoding=\"async\"` for Non-LCP Images\n\nAdd `decoding=\"async\"` to non-LCP images to prevent image decoding from blocking the main thread:\n\n```html\n\u003Cimg src=\"photo.webp\" alt=\"Description\" width=\"600\" height=\"400\" loading=\"lazy\" decoding=\"async\">\n```\n\n### CLS Prevention\n- `width` and `height` attributes set on all `\u003Cimg>` elements\n- `aspect-ratio` CSS as alternative\n- Flag images without dimensions\n\n```html\n\u003C!-- Good - dimensions set -->\n\u003Cimg src=\"photo.jpg\" width=\"800\" height=\"600\" alt=\"Description\">\n\n\u003C!-- Good - CSS aspect ratio -->\n\u003Cimg src=\"photo.jpg\" style=\"aspect-ratio: 4\u002F3\" alt=\"Description\">\n\n\u003C!-- Bad - no dimensions -->\n\u003Cimg src=\"photo.jpg\" alt=\"Description\">\n```\n\n### File Names\n- Descriptive: `blue-running-shoes.webp` not `IMG_1234.jpg`\n- Hyphenated, lowercase, no special characters\n- Include relevant keywords\n\n### CDN Usage\n- Check if images served from CDN (different domain, CDN headers)\n- Recommend CDN for image-heavy sites\n- Check for edge caching headers\n\n## Output\n\n### Image Audit Summary\n\n| Metric | Status | Count |\n|--------|--------|-------|\n| Total Images | - | XX |\n| Missing Alt Text | ❌ | XX |\n| Oversized (>200KB) | ⚠️ | XX |\n| Wrong Format | ⚠️ | XX |\n| No Dimensions | ⚠️ | XX |\n| Not Lazy Loaded | ⚠️ | XX |\n\n### Prioritized Optimization List\n\nSorted by file size impact (largest savings first):\n\n| Image | Current Size | Format | Issues | Est. Savings |\n|-------|--------------|--------|--------|--------------|\n| ... | ... | ... | ... | ... |\n\n### Recommendations\n1. Convert X images to WebP format (est. XX KB savings)\n2. Add alt text to X images\n3. Add dimensions to X images\n4. Enable lazy loading on X below-fold images\n5. Compress X oversized images\n\n## Error Handling\n\n| Scenario | Action |\n|----------|--------|\n| URL unreachable | Report connection error with status code. Suggest verifying URL and checking if site requires authentication. |\n| No images found on page | Report that no `\u003Cimg>` elements were detected. Suggest checking if images are loaded via JavaScript or CSS background-image. |\n| Images behind CDN or authentication | Note that image files could not be directly accessed for size analysis. Report available metadata (alt text, dimensions, format from markup) and flag inaccessible resources. |\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.\n","","imported","https:\u002F\u002Fgithub.com\u002Fsickn33\u002Fantigravity-awesome-skills","user_system_seed","SkillOPIC",true,80,864,"2026-05-16 13:39:40",{"id":8,"name":21,"slug":22,"icon":23,"description":24,"sort":25,"createdAt":26},"写作研究","writing","mdi-pencil-outline","从学术写作到创意文案，让 AI 成为你的专属写作助手",1,"2026-05-16 12:53:40",{"id":7,"name":28,"slug":29,"icon":30,"description":31,"moduleId":8,"sort":25,"skillCount":32,"createdAt":26},"文章写作","article","mdi-file-document-edit-outline","博客、新闻稿、自媒体文章等",61,[34],{"id":35,"skillId":4,"version":36,"fileName":37,"fileSize":38,"filePath":39,"fileHash":40,"manifest":41,"createdAt":19},"a5692ac8-e4b4-4577-8a93-3ad0cd6cd40d","1.0.0","seo-images.zip",3121,"uploads\u002Fskills\u002F6a03d045-0f74-4065-9ec5-3fe0788ac4ec\u002Fseo-images.zip","3a6becadadbbbd08fbb9892965c41a81ff2d50a2d32e1f021d35c1900839e0b6","[{\"path\":\"SKILL.md\",\"isDirectory\":false,\"size\":6786}]",{"code":43,"message":44,"data":45},200,"success",{"items":46,"stats":47,"page":50},[],{"averageRating":48,"totalRatings":48,"ratingCounts":49},0,[48,48,48,48,48],{"limit":51,"offset":48,"hasMore":52,"nextOffset":51,"ratedOnly":16},15,false]