Skip to content
24/7 support · 7-day money-back guarantee · Free plan, no card neededSee plans

Blog › WordPress SEO ›

Image SEO for WordPress: file names, alt text, formats, sizes and image search

Cover image: Image SEO for WordPress: file names, alt text, formats, sizes and image search

Images do three jobs for SEO. They help users understand and trust a page, they can bring traffic through image search and discovery features, and they strongly affect speed. Images that are badly handled cost you on all three fronts. Fortunately, good image practice is simple and repeatable. This guide covers choosing images, naming them, writing alt text, picking formats and sizes, serving them efficiently and helping search engines find them.

Contents of the guide: Image SEO for WordPress: file names, alt text, formats, sizes and image search
The main sections of this guide.

Start with useful images

Original photos, diagrams, screenshots and charts that explain something outperform generic stock images that add nothing. Search engines evaluate images in the context of the page, and users judge pages by their visuals. Where possible, show your own products, people, places and results. For tutorials, annotated screenshots help readers and also make the page more distinctive.

File names

Use short, descriptive, lowercase file names with hyphens, such as red-leather-hiking-boots.jpg instead of IMG_4821.jpg. The name gives a small signal about the content and helps you manage files. Avoid keyword stuffing.

Alt text

Alt text describes the image for people using screen readers and for search engines. Write it for accessibility first: what does the image show or what function does it serve?

  • Be specific and concise, usually under about 125 characters.
  • Describe the content, and the context if relevant.
  • Do not start with image of or picture of.
  • Do not stuff keywords.
  • For decorative images, use an empty alt attribute so screen readers skip them.
  • For images that are links, describe the destination or action.
  • For charts, give the key takeaway and put detail in the surrounding text.

Alt text is not the same as the caption or title. Captions are visible text that many users read, so use them when they add value.

Formats

  • JPEG suits photographs.
  • PNG suits graphics requiring transparency or sharp edges, though files can be large.
  • WebP offers smaller files than JPEG and PNG at similar quality and is widely supported.
  • AVIF can be smaller still and is increasingly supported; check your audience and tooling.
  • SVG suits logos and icons because it scales without quality loss. Sanitize uploads.

WordPress supports WebP natively, and newer versions support more modern formats. Offer fallbacks only when you need to support old browsers.

Dimensions and compression

Upload images at the size they will display, up to two times for high-density screens, not at full camera resolution. A 4000 pixel wide photo shown at 800 pixels wastes bandwidth. Compress with a quality that keeps appearance acceptable; tools and plugins can automate this. Check before and after.

Responsive images and lazy loading

WordPress adds srcset and sizes attributes to images inserted through the editor, letting browsers choose an appropriate file. Keep your theme’s declared sizes accurate. Lazy load images below the fold, but not the largest above-the-fold image, which should load early and can be preloaded. Always set width and height to prevent layout shift.

Placement and context

Place images near the text they relate to. Surrounding headings, captions and paragraphs help search engines understand them. Use one clear main image per page for featured and social previews. Avoid putting important text only inside images.

Social and featured images

Featured images appear in archives, search features and social previews. Set a clear, properly sized featured image for each post. For link previews, Open Graph and Twitter Card tags should point to an appropriate image, typically 1200 by 630 pixels. Your SEO plugin can manage these tags; check results with the meta checker.

Image sitemaps and discovery

Search engines can discover images through page HTML. Make sure images are in standard img elements or picture elements rather than only loaded via scripts or CSS backgrounds where they matter for search. Many SEO plugins include images in the XML sitemap. Do not block image folders in robots.txt; check with the robots.txt tool.

Structured data

For some content types, images are part of structured data: products, recipes, articles and videos can specify image properties. Provide high-quality images in the recommended sizes and aspect ratios. Validate markup with the schema checker.

Licensing and originality

Use images you own, have licensed or that are properly licensed for reuse. Keep records of licenses. Do not copy images from other sites. For people and sensitive subjects, obtain consent.

Bulk fixes in WordPress

On an existing site, audit the media library. Find missing alt text, oversized files and generic names. Fix the highest-traffic pages first. Compress the library with a reputable plugin or service and test. Run a site audit to list pages with missing alt attributes.

Accessibility benefits

Good alt text, adequate contrast and meaningful captions help users with disabilities and also tend to align with SEO. Accessibility and search quality overlap more than many assume.

A checklist for every image

  1. Does it add value?
  2. Descriptive file name.
  3. Correct size and format.
  4. Compressed.
  5. Alt text, or empty alt if decorative.
  6. Width and height set.
  7. Lazy loading appropriate.
  8. Placed near relevant text.
  9. License confirmed.

Frequently asked questions

Does alt text affect rankings? It helps search engines understand images and supports accessibility, and it matters most for image search.

Which format is best? WebP is a strong default for photos and graphics; use SVG for logos.

How big should images be? As large as they display, plus allowance for high-density screens.

Should I lazy load everything? No, not the main above-the-fold image.

Do I need an image sitemap? Usually not if images are discoverable on pages, but check your SEO plugin.

Keep reading

Comments

Leave a comment

Check your own site

Run a free audit and see what to fix first.

Run a free audit