Performance 3 min read

Image SEO in WordPress: Compress, Name, Alt Text and More

Images can bring traffic from Google Images, improve engagement — or slow your site to a crawl. Here's a WordPress-specific workflow for image SEO and performance.

On this page

Key takeaways

  • Optimise images for speed (size, format, compression), understanding (file names, alt text, context) and visibility (sitemaps, structured data).
  • Resize before upload, convert to WebP/AVIF, and let WordPress generate responsive sizes.
  • Write alt text for people first; it helps accessibility and Google Images.

Images can bring traffic from Google Images and Discover, make content clearer and keep readers engaged. They can also make your site painfully slow. Here’s how to get the benefits without the cost in WordPress.

Before uploading#

  • Resize: rarely more than 1600–2000 px wide; 1200 px is enough for most in-article images.
  • Crop to the part that matters.
  • Name the file descriptively: search-console-pages-report.png, not IMG_4821.png or screenshot-2026….
  • For screenshots, PNG→WebP conversion often saves 70%+.

In the Media Library#

Field What to write
Alt text What the image shows and why it’s there — see alt text guide
Title Optional; not a ranking factor
Caption Visible text under the image — captions are read a lot, use them for context
Description Used on attachment pages (which should usually redirect)

Compression and modern formats#

  • Use an optimisation plugin (ShortPixel, Imagify, EWWW, Converter for Media) or your host/CDN to compress and convert to WebP or AVIF.
  • WordPress supports uploading WebP and AVIF directly.
  • Bulk-optimise existing images once, then optimise new uploads automatically.

Responsive images and loading#

  • WordPress adds srcset/sizes automatically for Media Library images — see responsive images.
  • Keep width and height attributes to avoid layout shift.
  • Lazy-load below-the-fold images; never the featured/hero image — see lazy loading.
  • Remove unused image sizes registered by old themes/plugins to save storage.

Need a hand with this?

Get a quick, honest review of your website’s SEO.

Chat on WhatsApp

Attachment pages#

Each uploaded image can have its own thin “attachment page”. Redirect them to the file or parent post (Yoast and Rank Math have a setting; WordPress 6.4+ disables them by default on new sites). This theme also marks attachment pages noindex.

  • Use a 1200×630 (or larger 1.91:1) featured image for best social previews.
  • For Google Discover, use high-quality images at least 1200 px wide; this theme sets max-image-preview:large automatically.
  • Keep important text away from edges; social apps crop differently.

Context matters#

Google understands images partly through surrounding text. Place images next to the paragraph they illustrate, use relevant headings and captions, and avoid putting key text only inside images.

Checking your work#

  1. PageSpeed Insights: look for “Properly size images” and “Serve images in next-gen formats”.
  2. Search Console Performance → Search type: Image, to see image search traffic.
  3. Lighthouse Accessibility: missing alt attributes.

Image SEO FAQ#

Should alt text include keywords?#

Only if they naturally describe the image. Accurate descriptions come first.

Does image file size affect rankings?#

Indirectly, through page speed and Core Web Vitals, especially LCP.

Should I use a CDN for images?#

A CDN speeds up delivery worldwide; image CDNs can also resize and convert automatically.

Found this useful? Share it

Join the discussion

Your email address will not be published. Required fields are marked *

Security code image. If you cannot read it, press refresh or contact me on WhatsApp.