On-page

How Do I Optimize Images for SEO?

7 September 2026 2 min read

Optimizing images for SEO takes four steps: compress them so pages stay fast, give every image descriptive alt text, use readable file names, and set width and height so the page does not jump while loading. Alt text is missing on 28% of the pages we audited.

The four steps

  1. Compress to the smallest file that still looks sharp, usually WebP for photos and SVG for logos.
  2. Write alt text that describes the image for someone who cannot see it. Include a keyword only when natural.
  3. Name files before upload: red-running-shoes.webp beats IMG_4021.webp.
  4. Declare dimensions to prevent layout shift.

Audit your pages free

The On-Page SEO Checker reports your alt text coverage and image issues with the exact images flagged. Pair it with the Core Web Vitals Checker to see whether your images are dragging loading speed.

Frequently Asked Questions

Do image file names really matter?

Slightly, and they help your images rank in Google Images, which is its own traffic source.

Is WebP better than JPEG?

Same quality at smaller sizes. Use it where your platform allows.

Related reading

Put these tactics to work

Run InRankSEO's free SEO tools to audit your site, research keywords, and track your visibility across Google and AI search.