hyperrank
On-Page SEO

How to Optimize Images for SEO

Well-optimized images speed up your site, improve accessibility and can bring traffic from Google Images.

· 1 min read

Images often account for more than half of a page's weight. Optimizing them improves speed, accessibility and visibility in Google Images.

1. Choose the right format

  • WebP or AVIF: modern formats, lighter at equivalent visual quality, well supported by current browsers.
  • JPEG: for photos, when you are not using a modern format.
  • PNG: for images that need transparency or sharp flat areas.
  • SVG: for logos and icons, which stay sharp at every size.

2. Reduce file size

  • Resize the image to the size actually displayed (no point sending 4000 pixels of width for an 800-pixel slot).
  • Compress it with a suitable tool, checking that quality remains good.
  • Use the srcset and sizes attributes to serve a size suited to each screen.

3. Take care of the file name

Prefer title-tag-example.webp to IMG_4521.jpg. A descriptive, lowercase name with hyphens gives extra context.

4. Write a good alt attribute

  • Describe the image as you would to someone who can't see it.
  • Stay concise and relevant to the page's content.
  • Don't stack keywords: it is useless for screen readers and risky.
  • Leave the attribute empty (alt="") for purely decorative images.

5. Set dimensions and load intelligently

  • Set width and height to avoid layout shifts (CLS).
  • Enable lazy loading (loading="lazy") for images below the fold.
  • Do not lazy-load the main image that is visible on arrival, as it would slow down LCP.

6. Take care of the context

  • Place the image near text that discusses it and add a caption when useful.
  • Use real <img> tags for content images, rather than CSS background images, which Google can associate with the page less well.
  • Prefer original, good-quality images over generic visuals.

Finally, check the result with PageSpeed Insights and verify in Search Console that your pages are indexed.

#image seo#alt text#webp#lazy loading#google images
Check your site for free SEO audit, speed, security, E-E-A-T… results in seconds.
Run an SEO audit →