Image Optimization for SEO

VerifiedCaution

Image optimization analysis for SEO and performance. Checks alt text, file sizes, formats, responsive images, lazy loading, and CLS prevention.

Sby Skills Guide Bot
DevelopmentIntermediate
7/22/2026
Claude Code
#seo#image-optimization#alt-text#web-performance#audit

Recommended for

Automated summary

Analyzes a web page's image optimization for SEO and performance: alt text, file sizes, formats, responsive images, lazy loading, and CLS prevention.

Strengths

  • Gives tiered, numeric size thresholds per image category (thumbnail, content, hero) with warning and critical levels
  • Ships copy-paste HTML patterns: <picture> with AVIF/WebP, srcset/sizes, fetchpriority="high", decoding="async"
  • Explicitly separates above-fold from below-fold images so LCP images are never lazy-loaded
  • Assesses alt text with concrete good/bad examples and a 10-125 character target length

Limitations

  • Relies on browser tools (web_open, web_read_html, web_exec_js) that must exist in the environment, so it fails without them
  • Does not cover CSS background images or social metadata such as og:image and Twitter cards
  • Browser support percentages and the JPEG XL watch note are dated to late 2025 and need rechecking
When to use it

Use it to quickly audit a page's images before shipping or to fix an LCP score hurt by heavyweight visuals.

When not to use it

Don't use it for a full SEO audit of tags, copy and internal linking, or for optimizing images outside the web such as in a native mobile app.

Security analysis

Caution
Quality score88/100

The SKILL.md is a legitimate SEO image-audit guide. It contains no destructive commands, no curl|sh piping, no secret/token exfiltration, no obfuscated payloads, and no instructions to disable safety controls. However, its allowed-tools include term_run_command and web_exec_js, which grant shell and in-page JavaScript execution. Because those powerful tools are present for plausible legitimate auditing purposes (running image-size/CDN checks, inspecting DOM), the skill merits a caution rating rather than safe.

Findings
  • •Declared tools include term_run_command (shell execution) and web_exec_js, which are powerful capabilities even though the SKILL.md body only uses them implicitly for page inspection
  • •No explicit sandboxing or read-only restriction stated for terminal commands
  • •Skill reads arbitrary user-supplied URLs and interacts with live pages, which carries mild network/automation risk
How this analysis is made

Examples

Full page image audit
Run an image optimization audit on https://example.com/product: alt text, file sizes, formats, srcset and lazy loading.
Fix a slow hero image
My hero image takes 3 seconds to load — show me how to fix it with fetchpriority and a <picture> element using AVIF and WebP.
Rewrite alt text
Check the alt text on the images of this page and propose descriptive replacements between 10 and 125 characters.

name: seo-images description: > Image optimization analysis for SEO and performance. Checks alt text, file sizes, formats, responsive images, lazy loading, and CLS prevention. Use when user says "image optimization", "alt text", "image SEO", "image size", or "image audit". user-invokable: true argument-hint: "[url]" allowed-tools:

  • web_open
  • web_read_text
  • web_read_html
  • web_seo_audit
  • web_exec_js
  • web_click
  • web_type_input
  • web_press_key
  • term_run_command

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. Current browser support: AVIF 93.8%, WebP 95.3%.

JPEG XL: Emerging Format

In 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.

Responsive Images

  • srcset attribute for multiple sizes
  • sizes attribute 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">

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" on LCP images directly harms LCP scores. Reserve loading="lazy" for below-the-fold images only.

decoding="async" for Non-LCP Images

Add decoding="async" to non-LCP images to prevent image decoding from blocking the main thread:

<img src="photo.webp" alt="Description" width="600" height="400" loading="lazy" decoding="async">

CLS Prevention

  • width and height attributes set on all <img> elements
  • aspect-ratio CSS as alternative
  • Flag images without dimensions
<!-- Good - dimensions set -->
<img src="photo.jpg" width="800" height="600" alt="Description">

<!-- Good - CSS aspect ratio -->
<img src="photo.jpg" style="aspect-ratio: 4/3" alt="Description">

<!-- Bad - no dimensions -->
<img src="photo.jpg" alt="Description">

File Names

  • Descriptive: blue-running-shoes.webp not IMG_1234.jpg
  • Hyphenated, lowercase, no special characters
  • Include relevant keywords

CDN Usage

  • Check if images served from CDN (different domain, CDN headers)
  • Recommend CDN for image-heavy sites
  • Check for edge caching headers

Output

Image Audit Summary

| Metric | Status | Count | |--------|--------|-------| | Total Images | - | XX | | Missing Alt Text | ❌ | XX | | Oversized (>200KB) | ⚠️ | XX | | Wrong Format | ⚠️ | XX | | No Dimensions | ⚠️ | XX | | Not Lazy Loaded | ⚠️ | XX |

Prioritized Optimization List

Sorted by file size impact (largest savings first):

| Image | Current Size | Format | Issues | Est. Savings | |-------|--------------|--------|--------|--------------| | ... | ... | ... | ... | ... |

Recommendations

  1. Convert X images to WebP format (est. XX KB savings)
  2. Add alt text to X images
  3. Add dimensions to X images
  4. Enable lazy loading on X below-fold images
  5. Compress X oversized images

Error Handling

| Scenario | Action | |----------|--------| | URL unreachable | Report connection error with status code. Suggest verifying URL and checking if site requires authentication. | | No images found on page | Report that no <img> elements were detected. Suggest checking if images are loaded via JavaScript or CSS background-image. | | 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. |

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/image-optimization-for-seo-mrwak981/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/image-optimization-for-seo-mrwak981' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/image-optimization-for-seo-mrwak981/download' --output '.skill-downloads/image-optimization-for-seo-mrwak981/SKILL.md.part' && mv '.skill-downloads/image-optimization-for-seo-mrwak981/SKILL.md.part' '.skill-downloads/image-optimization-for-seo-mrwak981/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/image-optimization-for-seo-mrwak981/SKILL.md' && test -s '.skill-downloads/image-optimization-for-seo-mrwak981/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/seo-images' && cp -R '.skill-downloads/image-optimization-for-seo-mrwak981' '.claude/skills/seo-images'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/image-optimization-for-seo-mrwak981'

openskills read 'image-optimization-for-seo-mrwak981'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/image-optimization-for-seo-mrwak981/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills