Image Optimization
The Image Optimization agent is a specialized SEO analyzer focused on image optimization for SEO and performance. It evaluates images on web pages for alt text quality, sizing attributes, modern formats, lazy loading, Largest Contentful Paint (LCP) optimization, and file size efficiency.
When to Use
Use this agent when:
- You need to audit images for SEO best practices
- You're optimizing images for Core Web Vitals (CLS, LCP)
- You want to improve image alt text for accessibility and search
- You're checking for Cumulative Layout Shift (CLS) caused by unsized images
- You need to modernize image formats (WebP/AVIF adoption)
How It Works
- Fetches the target page - Extracts all
<img>elements, CSS background images,<picture>elements - Audits Alt Text - Evaluates descriptiveness, length (10-125 chars), relevance, and flags missing alt text
- Checks Image Sizing - Verifies width/height attributes present to prevent layout shift
- Analyzes Image Formats - Identifies modern formats (WebP/AVIF) vs legacy (JPEG/PNG/GIF)
- Assesses Lazy Loading - Checks if below-fold images use
loading="lazy"for performance - Verifies LCP Optimization - Ensures hero/above-fold images have
fetchpriority="high" - Reviews Responsive Images - Checks for
srcsetandsizesattributes for device adaptation
Focus Areas
- Alt Text Quality: Descriptive, contextually relevant, natural keywords, 10-125 characters
- Image Sizing: Explicit width/height attributes to prevent Cumulative Layout Shift (CLS)
- Modern Formats: WebP and AVIF adoption vs legacy PNG/JPEG only
- Lazy Loading: Below-fold images using
loading="lazy"to defer loading - LCP Optimization: Hero image priority with
fetchpriority="high" - File Size: Oversized images impacting page load time
- Responsive Images:
srcsetandsizesfor responsive delivery across devices
Tools Available
This agent has access to: Read, Glob, Grep, WebFetch
Alt Text Quality Levels
| Quality | Criteria | Examples |
|---|---|---|
| Good | Descriptive, 10-125 chars, contextually relevant | "Woman typing on laptop at desk" |
| Acceptable | Present but generic | "image", "photo" |
| Poor | Filename-based | "IMG_001.jpg", "screenshot-2024-01-15" |
| Missing | No alt attribute | ❌ |
| Decorative | Empty alt="" | Correct for purely decorative images |
| Keyword-stuffed | Excessive keywords crammed in | ❌ |
Scoring Guide
| Aspect | Weight | Scoring |
|---|---|---|
| Alt text quality | 30% | -3 per missing, -2 per poor quality |
| Sizing (CLS) | 20% | -3 per image without width/height |
| Modern formats | 15% | -2 per legacy-only image |
| Lazy loading | 15% | -2 per below-fold image without lazy |
| LCP optimization | 10% | -10 if LCP image missing priority |
| Responsive images | 10% | -2 per large image without srcset |
Example Usage
Task(
description: "Analyze image optimization",
prompt: "Audit all images on https://example.com for SEO and performance. Check alt text, sizing, formats, lazy loading, and LCP optimization.",
subagent_type: "agileflow-seo-analyzer-images"
)Output Format
FINDING-1: Missing alt text on hero image
Category: Alt Text
URL: https://example.com
Image: /images/hero.jpg
Severity: CRITICAL
Confidence: HIGH
Issue: Hero image has no alt attribute, missing accessibility and search optimization.
Current:
<img src="hero.jpg">
Remediation:
<img src="hero.jpg" alt="Professional team collaborating in modern office">Important Rules
- Fetch actual page - Use WebFetch to see real image tags, don't guess
- Don't penalize decorative images - Empty
alt=""is correct for purely decorative images - Prioritize by impact - Large hero images matter more than tiny icons
- Consider context - Alt text should match the page's content context
- Estimate above/below fold - First 2-3 images are likely above-fold
Common Issues Found
- Missing alt text on images
- Filename-based alt text (IMG_001.jpg)
- Missing width/height causing CLS
- Only legacy formats (JPEG/PNG) without WebP/AVIF
- Missing lazy loading on below-fold images
- Hero image lacking fetchpriority="high"
- Images without responsive srcset on image-heavy pages
Related Agents
seo-analyzer-performance- Core Web Vitals and CLS analysisseo-analyzer-technical- Technical SEO foundationseo-consensus- SEO audit synthesis