On-page SEO guide

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

By Anis Harbaoui, SEO specialist · Published 2 November 2026 · Updated 2 November 2026

Image SEO is the work of making images easy for search engines to find, understand and show, mainly through alt text, file names, formats and page context. WordPress already handles part of it, such as responsive sizes and lazy loading. The rest is down to how you name, describe and place each image.

Key takeaways
  • Write alt text that describes the image, not a list of keywords.
  • Rename files before upload: blue-trail-shoes.jpg, not IMG_0042.jpg.
  • Use real <img> elements. Google does not index CSS background images.
  • WebP and AVIF keep files small, and WordPress supports both.

What is alt text and how should you write it?

Alt text is a short description in the alt attribute of an image. Screen readers read it aloud, and search engines use it to understand the image. Describe what the image shows in the context of the page, in one plain sentence. Use a keyword only where it fits naturally.

In WordPress, set it in the Alternative Text field of the Media Library or the image block.

Do image file names matter?

Yes, a little. Google recommends short, descriptive file names. woocommerce-product-schema-example.png tells it more than screenshot-3.png. Rename files before you upload them, because changing a file name later changes its URL.

Which image formats work best in WordPress?

Google can index BMP, GIF, JPEG, PNG, WebP, SVG and AVIF. For photos, WebP or AVIF usually gives the smallest file at the same quality. WordPress accepts WebP uploads since version 5.8 and AVIF since 6.5. PNG still suits screenshots with sharp text, and SVG suits logos and icons.

Does WordPress lazy-load images?

Yes. Since version 5.5, WordPress adds loading="lazy" to most images in content, and it creates several sizes of each upload so browsers can pick the right one. Avoid lazy-loading the main image at the top of the page, because it slows down what visitors see first.

Why are my images not showing in Google Images?

The usual causes:

  • The image is a CSS background, which Google does not index.
  • The image folder is blocked in robots.txt. See the robots.txt guide.
  • The page itself is noindexed or not indexed yet.
  • The image has no useful text around it: no alt text, caption or nearby heading.

How to do it with NexalSEO

NexalSEO helps in two places:

  1. In the editor, the Content signals check flags a focus keyword that has no image with matching alt text. The featured image counts too.
  2. Under Nexal SEO → XML Sitemap, keep include images on so your images are listed in the sitemap.

Pages built with Elementor are read correctly: NexalSEO pulls each image’s alt text from the Media Library.

Frequently asked questions

Should every image have alt text?

Every meaningful image should. Purely decorative images, such as dividers, can use an empty alt attribute so screen readers skip them.

Does alt text help rankings?

It helps Google understand the image and its page, which matters most for image search. It is not a shortcut for ranking the page itself.

Do I need an image sitemap?

Not always. It helps Google find images it might miss, such as images loaded by scripts. Listing images in your normal sitemap does the same job.

Related guides

Meta descriptions

Write the text under your search result.

XML sitemaps

How images get listed for crawlers.

Schema markup

Structured data, including images.

Catch missing alt text while you write

The NexalSEO WordPress SEO plugin checks images and alt text as part of its content analysis. Read how in the content analysis documentation.

See all features