Optimagio

Image SEO Essentials: Alt Text, Filenames & Structured Data

Learn how to implement comprehensive image SEO with proper alt text, descriptive filenames, and structured data markup to boost search visibility and accessibility.

Optimagio Team 4 min read
Image SEO Essentials: Alt Text, Filenames & Structured Data

Beyond Compression: The Complete Image SEO Picture

While image compression and modern formats like WebP and AVIF are crucial for performance, they're only part of the image SEO equation. Search engines rely on textual cues to understand and rank your images. Proper implementation of alt text, descriptive filenames, and structured data markup can significantly improve your images' search visibility while enhancing accessibility for all users.

Writing Effective Alt Text

Alt text serves dual purposes: it provides accessibility for screen reader users and gives search engines contextual information about your images. Well-written alt text can significantly impact how your images are discovered and understood in search results.

  1. 1Describe the content and functionExplain what the image shows and its purpose on the page. For functional images (buttons, icons), describe the action.
  2. 2Be specific but conciseAim for 5-15 words that accurately describe the image without unnecessary details.
  3. 3Include relevant contextConsider how the image relates to the surrounding content and include that context when appropriate.
  4. 4Avoid keyword stuffingWrite for humans first—search engines can detect unnatural keyword repetition.
  5. 5Skip 'image of' or 'picture of'Screen readers already announce it as an image, so focus on the content itself.

Crafting Descriptive Filenames

Your image filenames provide another important signal to search engines. Generic names like 'IMG_1234.jpg' offer no contextual information, while descriptive filenames help search engines understand and categorize your images.

Do
  • Use descriptive, relevant keywords
  • Separate words with hyphens (red-running-shoes.jpg)
  • Keep filenames concise but meaningful
  • Include product names or model numbers for e-commerce
Don't
  • Use generic names (image1.jpg, photo.png)
  • Include underscores or spaces
  • Stuff with irrelevant keywords
  • Make excessively long filenames

Implementing Structured Data Markup

Structured data helps search engines understand the context and relationship of your images to your content. This can lead to enhanced search appearances, including rich results and image carousels.

{
  "@context": "https://schema.org",
  "@type": "ImageObject",
  "contentUrl": "https://example.com/images/red-running-shoes.jpg",
  "description": "Red running shoes with breathable mesh upper",
  "license": "https://creativecommons.org/licenses/by/4.0/",
  "acquireLicensePage": "https://example.com/license"
}
  • Use Schema.org vocabulary for maximum compatibility
  • Implement JSON-LD format for easiest maintenance
  • Include essential properties: contentUrl, description, and relevant context
  • Test your markup with Google's Rich Results Test tool

Common Implementation Pitfalls to Avoid

Even with good intentions, developers often make mistakes that undermine their image SEO efforts. Being aware of these common pitfalls can help you avoid them from the start.

Myth
  • More keywords in alt text equals better SEO
  • All images need detailed alt text
  • Structured data is only for large websites
Fact
  • Keyword stuffing can trigger penalties—focus on quality
  • Decorative images should have empty alt attributes
  • Structured data benefits websites of all sizes

Testing and Validation

Implementing image SEO properly requires testing and validation. Use available tools to ensure your alt text, filenames, and structured data are working as intended.

  • Test with screen readers
  • Validate structured data markup
  • Check Google Search Console performance
  • Verify image appearance in search results
  • Test with different assistive technologies

Automate image optimization with Optimagio

Doing this by hand for every image does not scale. Optimagio optimizes and converts your images (WebP and AVIF) automatically across your API, web app, and CMS — so every page ships the smallest possible files without manual work. See plans and pricing →

FAQ

Frequently asked questions

How long should image alt text be?

Keep alt text concise but descriptive, typically under 125 characters. Focus on accurately describing the image's content and function rather than length.

Should I include keywords in image filenames?

Yes, use relevant keywords in filenames but avoid stuffing. Descriptive filenames like 'red-running-shoes-product.jpg' help search engines understand image content.

What's the difference between alt text and structured data for images?

Alt text describes the image content for accessibility and basic SEO, while structured data provides additional context about the image's relationship to the page content, helping search engines display images in richer results.

Do decorative images need alt text?

Decorative images that don't convey content should have empty alt attributes (alt="") to indicate they should be ignored by screen readers while still maintaining valid HTML.

How can I test if my image SEO is working properly?

Use Google Search Console's URL inspection tool, screen reader testing, and structured data testing tools to verify your implementation. Check how your images appear in search results.