HOME SKILLS BLOG GITHUB
// SKILL

IMAGE OPTIMIZATION
ANALYSIS

Comprehensive image SEO audit covering alt text quality, file size analysis with tiered thresholds, modern format detection (WebP/AVIF), responsive images, lazy loading, fetchpriority for LCP images, CLS prevention, file naming, and CDN usage.

$
/seo images https://your-site.com

REQUIRES CLAUDE SEO INSTALLED IN CLAUDE CODE

Claude SEO image optimization analysis
// HOW IT WORKS

8 CHECKS. EVERY IMAGE.

When you run /seo images, Claude SEO fetches the page, finds every <img> element, and runs 8 categories of checks against each one. The output is sorted by file size impact so you fix the biggest wins first.

The audit covers both SEO signals (alt text, file names, schema) and performance signals (file size, format, lazy loading, CLS prevention). Images behind CDNs or authentication are noted with available metadata reported.

/seo images <url> Fetch page, find all <img> ALT TEXT 10-125 chars FILE SIZE Tiered thresholds FORMAT WebP / AVIF RESPONSIVE srcset + sizes LAZY LOADING Below-fold only CLS PREVENTION width + height FILE NAMES Descriptive, hyphenated CDN USAGE Edge caching PRIORITIZED OPTIMIZATION LIST Sorted by file size impact (largest savings first)

What each check covers

Every image on the page is evaluated across 8 dimensions. The output table is sorted by estimated file size savings so you can prioritize the changes with the biggest performance impact.

125
ALT TEXT AUDIT
Checks that alt text is present on all img elements (except decorative with role=presentation), is descriptive of the image content, includes relevant keywords naturally without stuffing, and is between 10-125 characters. Flags filenames-as-alt-text and keyword stuffing.
3
FILE SIZE TIERS
Tiered thresholds by image category. Thumbnails: target under 50KB, critical above 200KB. Content images: target under 100KB, critical above 500KB. Hero/banner images: target under 200KB, critical above 700KB. Recommends compression without quality loss.
5
FORMAT ANALYSIS
Checks for modern formats: WebP (97%+ support), AVIF (92%+ support), and traditional JPEG/PNG/SVG. Recommends the picture element pattern with progressive enhancement, AVIF first, WebP second, JPEG/PNG fallback.
srcset
RESPONSIVE IMAGES
Verifies srcset attribute for multiple sizes, sizes attribute matching layout breakpoints, and appropriate resolution for device pixel ratios. Ensures images are not oversized for their display containers.
LCP
LAZY LOADING
Checks for loading="lazy" on below-fold images and flags lazy-loaded above-fold/hero images (which hurt LCP). Verifies fetchpriority="high" on LCP images and decoding="async" on non-LCP images to prevent main thread blocking.
CLS
CLS PREVENTION
Flags images missing width and height attributes or CSS aspect-ratio. Without explicit dimensions, images cause Cumulative Layout Shift as they load and push content around the page.
// OUTPUT

WHAT THE REPORT INCLUDES

The image audit produces a summary table showing total images found, counts of issues by category, and a prioritized optimization list sorted by estimated file size savings.

Image audit summary

MetricWhat it tracks
Total imagesAll img elements on the page
Missing alt textImages without descriptive alt attributes
Oversized (above 200KB)Images exceeding size thresholds for their category
Wrong formatJPEG/PNG images that should be WebP or AVIF
No dimensionsImages missing width/height or aspect-ratio
Not lazy loadedBelow-fold images without loading="lazy"

Prioritized optimization list

Each image is listed with its current size, format, detected issues, and estimated savings if optimized. The list is sorted by file size impact so the biggest performance wins appear first. Recommendations include specific format conversions, compression targets, and code fixes.

Format recommendations

The recommended picture element pattern uses progressive enhancement:

<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>
// USAGE

HOW TO RUN AN IMAGE AUDIT

Step 1: Install Claude SEO

git clone --depth 1 https://github.com/AgriciDaniel/claude-seo.git
bash claude-seo/install.sh

Step 2: Run the image audit

/seo images https://your-site.com

Claude SEO fetches the page, finds every img element, and analyzes all 8 dimensions. The output includes a summary table and a prioritized optimization list sorted by estimated savings.

File naming best practices

The audit also checks file names. Good image file names are descriptive, hyphenated, lowercase, and include relevant keywords. For example, blue-running-shoes.webp is preferred over IMG_1234.jpg.

// FAQ

QUESTIONS ABOUT IMAGE OPTIMIZATION

Claude SEO recommends WebP (97%+ browser support) as the default format and AVIF (92%+ support) for best compression. It checks for the picture element with format fallbacks: AVIF first, then WebP, then JPEG/PNG as the fallback. JPEG XL is monitored but not yet practical for web deployment.
File sizes are evaluated with tiered thresholds by image category. Thumbnails: target under 50KB, warning above 100KB, critical above 200KB. Content images: target under 100KB, warning above 200KB, critical above 500KB. Hero/banner images: target under 200KB, warning above 300KB, critical above 700KB.
The audit checks that alt text is present on all img elements (except decorative images with role=presentation), is descriptive of the image content (not just a filename like image.jpg), includes relevant keywords naturally without stuffing, and is between 10-125 characters in length.
The fetchpriority="high" attribute tells the browser to prioritize downloading your hero/LCP (Largest Contentful Paint) image in the network queue. It should be added to the above-the-fold image that determines your LCP score. Critically, LCP images should never have loading="lazy", as that directly harms LCP scores.
Cumulative Layout Shift (CLS) occurs when images load without reserved space, causing page content to jump. The audit flags images missing width and height attributes or CSS aspect-ratio. Setting explicit dimensions lets the browser reserve the correct space before the image loads, preventing layout shifts.
// RELATED SKILLS

EXPLORE MORE

VIEW ALL 14 SKILLS →

OPTIMIZE YOUR IMAGES
IN SECONDS.

$
git clone --depth 1 https://github.com/AgriciDaniel/claude-seo.git && bash claude-seo/install.sh
VIEW ON GITHUB ALL SKILLS >