All guides
7 min read
by Nesou

Image SEO Guide: Alt Text, File Names and Compression

Most websites treat images as decoration. Search engines and assistive technology need context. This guide covers alt text, file names, compression, captions, and structured data.

Nesou
Image SEO Guide: Alt Text, File Names and Compression

Images can bring useful search traffic, but they also affect accessibility, page speed, and how clearly a page communicates. For blogs, stores, and portfolios, image SEO starts with doing several small things consistently.

This guide covers the practical pieces you can control: alt text, file names, dimensions, compression, captions, and structured data.

Why image SEO matters more than ever

Google's search results increasingly include image carousels, visual answers and Google Lens results. A well-optimized image can appear in:

  • Google Image Search (direct traffic)
  • Image carousels in regular search results
  • Google Discover (visual feed)
  • Google Lens results (visual search)

Each of these can help people discover visual content when the image and surrounding page are relevant, accessible, and well optimized.

A useful image with clear context has a better chance of being understood by people, search engines, and assistive technology.

1. File names: your first keyword opportunity

Google reads file names. IMG_4821.jpg tells it nothing. best-color-palettes-for-web-design-2026.jpg tells it exactly what the image is about.

  • Use lowercase letters and hyphens (not underscores or spaces)
  • Include your primary keyword naturally
  • Keep it under 5 words, descriptive, not stuffed
  • Rename before uploading, you can't change it after without breaking links

2. Alt text: accessibility and SEO in one

Alt text serves two purposes: it describes the image to screen readers (accessibility) and tells Google what the image shows (SEO). Write it for a person who can't see the image. Google's Image SEO best practices guide specifically recommends writing descriptive, keyword-relevant alt text for every meaningful image.

  • Good: alt="Color palette generator showing five harmonious shades of blue"
  • Bad: alt="image" or alt="color palette generator color palette generator free"
  • Keep it under 125 characters
  • Include your keyword naturally, don't force it
  • Decorative images (dividers, backgrounds) should have empty alt: alt=""

3. Image compression: a practical page-speed win

Page speed matters for users and is part of Google's Core Web Vitals guidance via Core Web Vitals. Images are often the heaviest assets on a page, so compression is one of the simplest performance checks to add before publishing.

Use the Sounez Image Compressor. It runs entirely in your browser, so files never leave your device. Aim for under 200 KB per image. Read the full guide on compressing images without losing quality for the complete method.

4. Image dimensions: serve the right size

Serving a 4000px image in a 800px container wastes bandwidth and hurts Core Web Vitals. Resize images to their actual display size before uploading:

  • Hero images: 1600px wide
  • Blog inline images: 1200px wide
  • Thumbnails: 400-600px wide
  • Open Graph images: 1200x630px

5. Modern formats: WebP and AVIF

WebP is 25–35% smaller than JPG at equivalent quality and is supported in every modern browser. AVIF compresses even further but has slightly patchier support on older devices. Use WebP as your default export format. The file size savings directly improve your Core Web Vitals score, particularly Largest Contentful Paint (LCP) for hero images.

When to keep PNG or JPG: use PNG for images that need transparency when WebP is not supported by your CMS or upload pipeline. Use JPG only when a platform explicitly requires it. In every other case, WebP is the better choice for web publishing.

6. Lazy loading: don't load what isn't visible

Add loading="lazy" to every image below the fold. This defers loading until the user scrolls near the image, dramatically improving initial page load time. Your hero image should always have loading="eager" (or no loading attribute), it's your LCP element.

7. Structured data for images

For recipes, products and articles, adding ImageObject structured data helps Google understand your images and can show rich results in search. At minimum, include the image URL in your article or product schema.

8. Captions: underrated SEO signal

Captions help readers understand why an image is there. Write descriptive captions that add context instead of repeating the headline. Keep them short with the Word Counter.

The image SEO checklist

  1. Descriptive, keyword-rich file name (hyphens, lowercase)
  2. Meaningful alt text (under 125 characters)
  3. Compressed to under 200 KB with the Image Compressor
  4. Resized to actual display dimensions
  5. WebP format where possible
  6. loading="lazy" on below-fold images
  7. Descriptive caption
  8. Structured data for product/recipe/article images

Frequently Asked Questions

How long does it take for images to appear in Google Image Search?

It depends on when Google crawls and indexes the page. New sites often take longer, and no optimization can guarantee placement. Submitting a sitemap that includes image URLs can help Google discover them faster.

Does image file size affect SEO?

Large images can slow a page and hurt user experience. Compression helps page speed, which is a factor in Core Web Vitals and contributes to a better search ranking signal overall.

Should I use stock photos or original images?

Original images are better for SEO because they are unique to your page and cannot be found elsewhere. Stock photos can still work when they are relevant and properly described, but they add less signal than original photography or custom graphics.

What's the most important image SEO factor?

Start with useful alt text, sensible file names, appropriate dimensions, and compression. These four basics cover the majority of image SEO for most sites. Structured data is valuable but only after the fundamentals are in place.

What is an image sitemap and do I need one?

An image sitemap lists image URLs on your site, helping Google discover images that might not be found through regular crawling. Most CMS platforms generate this automatically. If you host images on a CDN or use JavaScript-rendered images, an image sitemap is especially useful.

Does adding loading="lazy" hurt my LCP score?

It can if applied to your above-the-fold hero image. The Largest Contentful Paint element is usually the hero image, and lazy loading it delays its render. Always use loading="eager" or omit the attribute entirely on your hero image. Apply loading="lazy" only to images below the fold.

Conclusion: treat every image as part of the page

Image SEO works best when images serve the reader first. Compress your images with the Image Compressor, write real alt text, use descriptive file names, and serve the right dimensions. Those habits make pages clearer, faster, and easier to understand.

Found this article useful?

Written by

NesouFounder & Creator

Nesou is a web developer and independent creator who built Sounez from scratch in 2024. The site covers practical browser tools for image editing, CSS design, social media publishing, file conversion, and everyday productivity — all written and maintained by a single developer with a focus on privacy-first, account-free tooling. About Sounez · GitHub

Ready to put this into action?

Open Image Compressor and try it now. Free, no account needed.

Open Image Compressor

Keep reading