โ† All articles

How to Optimize Images for SEO: A Practical Guide

2026-12-03 ยท SEOmash Blog

Laptop screen showing an image being optimized for SEO, with a smaller file size after compression

Learning how to optimize images for SEO is a fast practical win for any website. Images are usually the heaviest part of a page, and heavy pages load slowly, frustrate visitors, and waste crawl time. Well-optimized images can also bring traffic through Google Images. This guide covers format, compression, resizing, alt text, file names, and fast loading. No step needs a developer, and none carries a ranking promise โ€” image SEO supports the rankings good content earns.

Why Image SEO Matters

An unoptimized image hurts a page in two quiet ways. First, it slows the page down. A single uncompressed photo from a phone camera can be several megabytes, and a page with five of those can take seconds to load on a mobile connection โ€” long enough for visitors to leave. Page speed is part of how Google judges a page, and our guide on how to improve Core Web Vitals explains the measurements that matter most. Second, search engines cannot see an image the way a person can. They rely on the file name, the alt text, and the words around the image to understand what it shows. An image called IMG_4821.jpg with no alt text tells Google nothing. Image SEO is mostly a habit, not a skill โ€” a short checklist applied to every image covers almost all of it.

Choose the Right Image Format

Format choice is the biggest lever on file size โ€” pick wrong and no compression will save you.

Format Best for Compression
JPEG Photographs Lossy, small files
PNG Logos, screenshots Lossless, often large
WebP Most photos and graphics Lossy and lossless
AVIF Photos at tiny sizes Best compression
SVG Logos, icons, diagrams Vector, tiny files

WebP is the safe default in 2026: Google's own comparisons show it roughly 25โ€“35% smaller than JPEG at equal quality, and every major browser supports it. AVIF compresses further โ€” benchmarks put it around 30โ€“50% smaller than JPEG โ€” but encoding is slower, so use it when your platform supports it. Keep PNG for transparency, and use SVG for logos and icons โ€” sharp at any size, almost weightless.

Compress Images Before You Upload

Compression removes data the eye barely notices โ€” the step most sites skip. A quality setting of 70โ€“80% for JPEG or WebP usually looks identical to the original on screen while cutting the file size by more than half. Squoosh, Google's free browser compressor, lets you compare original and compressed side by side; TinyPNG and ShortPixel do the same, and most WordPress image plugins compress on upload automatically. Aim for under 200 KB for heroes, under 100 KB for content images. If a single image is still over 500 KB after compression, it is almost certainly far larger than its display size.

Resize Images to Their Display Size

Uploading a 4,000-pixel-wide photo into a slot that displays at 800 pixels wide forces every visitor to download five times more data than they ever see. Resize before you upload: heroes 1,600โ€“2,000 px wide, content images 800โ€“1,200, thumbnails 300โ€“600. For Retina sharpness, up to twice the display width is enough โ€” more is wasted bytes. Crop to the ratio your layout expects, such as 16:9 for covers.

How to Write Image Alt Text for SEO

Alt text is the short description in an image's alt attribute. It exists first for accessibility โ€” screen readers read it aloud โ€” and its SEO value follows: the same sentence tells search engines what the image contains. Write alt text for people first.

  1. Describe what is actually in the image. Subject, action, and one useful detail are enough โ€” for example, "Barista pouring latte art into a ceramic cup on a wooden counter."
  2. Keep it to one sentence, roughly 5โ€“15 words. Many screen readers cut off longer text.
  3. Do not start with "an image of." The alt attribute already tells the screen reader it is an image.
  4. Use your page's keyword only when it fits naturally. Once is plenty โ€” a list of keywords crammed into alt text is stuffing.
  5. Leave decorative images empty. A divider or background pattern should get alt="" so screen readers skip it.

For the same screenshot, image1 says nothing, and seo tools keyword research google rankings free trial buy now is a keyword list. SEOmash keyword research report showing search volume and difficulty for ten keywords works โ€” a screen reader user understands it, and a search engine does too.

Use Descriptive File Names

Rename every image before you upload it โ€” the file name is a small ranking signal and how you will find the image again later. Use lowercase letters and hyphens between words โ€” Google treats hyphens as word separators, but underscores are not treated the same way. Screenshot 2026-03-15 at 10.42.17 AM.png should become something like compress-png-before-after.webp. Keep file names short, five or six words at most, and do not stuff them with keywords any more than you would stuff the alt text.

Lazy Loading and Responsive Images

How an image loads matters as much as its size. Three rules cover most of it.

Never lazy-load the hero image. The hero is above the fold, so delaying it delays the largest visible element and hurts Largest Contentful Paint. Give it fetchpriority="high" instead.

Lazy-load everything below the fold. Add loading="lazy" to images further down the page so the browser only downloads them when the visitor scrolls near. Most modern platforms, including WordPress, do this by default โ€” check that yours does.

Set explicit width and height on every image. When the browser knows the dimensions in advance, it reserves the space first, preventing the layout from jumping as images load. That jump is Cumulative Layout Shift โ€” see our technical SEO checklist for beginners for the full set of checks.

Help Google Find Your Images

Optimized images still need to be discoverable. Put images near relevant text: Google uses the heading, paragraph, and caption around an image to understand what it shows. Most SEO plugins add images to your XML sitemap automatically โ€” check the settings, so Google can index images it might otherwise miss. Our guide on how to get Google to index your website covers sitemaps and the URL Inspection tool.

A Repeatable Image SEO Workflow

Use this checklist every time you publish โ€” a few minutes per image prevents most image problems.

  1. Choose the image. Original photos and graphics outperform generic stock.
  2. Crop and resize to the slot it will fill โ€” no wider than twice the display size.
  3. Pick the format: WebP by default, AVIF if supported, PNG for transparency, SVG for logos.
  4. Compress to under 200 KB for heroes and under 100 KB for content images.
  5. Rename the file with a short, hyphenated, descriptive name.
  6. Write the alt text in one sentence, for a person first.
  7. Place the image next to relevant text, add a caption if it helps, and lazy-load it unless it is the hero.
  8. Check the result in PageSpeed Insights โ€” if images are still the largest problem, the report names the exact files.

Run it on existing pages too, starting with the ones that already get traffic. Our guide on how to do keyword research for beginners helps you pick the topics worth that effort first, and the on-page SEO checklist puts image optimization alongside the other fixes that matter on any page.

Frequently Asked Questions

Does alt text help SEO?

Yes. It tells search engines what the image shows, helping it rank in Google Images, and it makes the page accessible to screen reader users. Write alt text for the person first.

Can optimized images rank in Google Images?

Yes. Images with descriptive file names, accurate alt text, relevant surrounding text, and fast loading are the ones Google Images surfaces โ€” a meaningful share of visits for visual topics like products, recipes, and how-to guides.

Start With Your Most-Visited Pages

Image SEO rewards consistency: a short checklist, applied to every new image and then to your most-visited pages, compounds over time. Faster pages keep visitors longer, clearer images earn image search traffic, and accessible alt text serves readers who would otherwise be shut out. Pick your five most-visited pages and run the workflow on their images this week.

Read Next