Image SEO

Automatically optimize image alt text and title attributes for better accessibility and search visibility.

Overview

The Image SEO module automatically adds alt text and title attributes to images that are missing them. This improves both accessibility (screen readers rely on alt text to describe images to visually impaired users) and SEO (search engines use alt text to understand what an image depicts and rank it in image search results).

Enable the module from Prime SEO → Settings and scroll to the Image SEO section.

How It Works

When WordPress renders a page, Prime SEO checks each image in the content. If an image is missing an alt text attribute or a title attribute, Prime SEO generates one automatically based on:

  • The image filename — cleaned up by removing dashes and underscores, then properly capitalized
  • The post title — used as additional context when the filename alone is not descriptive
  • The image caption — used if available and more descriptive than the filename
Note
Image SEO only fills in missing attributes. It never overwrites alt text or titles you've manually set.

Alt Text Generation

For images without alt text, Prime SEO generates descriptive text from the filename. The module strips file extensions, replaces dashes and underscores with spaces, and applies proper capitalization:

  • blue-mountain-landscape.jpg → "Blue mountain landscape"
  • product_photo_001.png → "Product photo 001"
  • IMG_20240115.jpg → uses the post title instead, since the filename is not descriptive

When the filename consists only of random characters or camera-generated codes (like IMG_ or DSC_ prefixes), Prime SEO falls back to the post title to produce meaningful alt text.

Title Attributes

When enabled, the title attribute is added to images that are missing one. The title attribute creates a hover tooltip when users mouse over the image. This uses the same generation logic as alt text — the filename is cleaned up, and the post title is used as a fallback for non-descriptive filenames.

Configuration

Navigate to Prime SEO → Settings and scroll to the Image SEO section. You'll find two options:

  • Auto Alt Text — Enable or disable automatic alt text generation for images missing the alt attribute
  • Auto Title — Enable or disable automatic title attribute generation for images missing the title attribute

Both options are independent — you can enable one without the other depending on your needs.

Tip
Always provide manual alt text for important images in your content. The auto-generated alt text is a safety net for images you might forget to label.

Best Practices

Follow these guidelines to get the most out of Image SEO and ensure your images are properly optimized:

  • Write manual alt text for key images — product photos, infographics, hero images, and any visual that communicates important information should have hand-written descriptions
  • Keep alt text concise — aim for under 125 characters; describe what the image shows without unnecessary filler
  • Don't stuff keywords — alt text should describe what the image actually shows, not be a place to cram in SEO keywords
  • Use descriptive filenames — before uploading, rename files from IMG_001.jpg to something meaningful like red-hiking-boots-side-view.jpg
  • Enable Image SEO as a fallback — even if you write manual alt text for most images, the module catches any you might miss
Warning
Auto-generated alt text from filenames is a fallback, not a replacement for proper image descriptions. For accessibility compliance (WCAG), manually describe important visual content.

Ready to optimize your site?

Install Prime SEO in under 2 minutes. Free forever.

Install Free Plugin