SEO

Image SEO: Alt Text, File Names and Formats That Help You Rank

A practical image SEO guide: alt text examples that help screen readers and Google, file names, WebP vs AVIF, file size, lazy loading and image sitemaps.

Two colleagues looking at a desktop monitor while planning website changes

Here is one product photo from a made-up but very typical WordPress store, a custom furniture maker in Ontario, as it usually looks before an audit:

AttributeBeforeAfter
File nameIMG_4471-scaled.jpgwalnut-dining-table-six-seat.webp
Alt textEmpty, or “image”Six-seat walnut dining table with tapered legs and a matching bench
Format and weightJPEG straight from a phone, several megabytesWebP, resized to the largest size the theme actually displays
LoadingLazy-loaded, even though it is the first thing on the pageLoaded immediately, with fetchpriority="high"
ContextSits alone in a gallery with no text nearbyA caption, plus a product description that mentions walnut and seating

That is image SEO in one table. Nothing in the right-hand column is clever. Each fix is small, and together they decide two things: whether the photo can appear in Google Images when someone searches for a walnut dining table in Toronto, and whether the product page loads fast enough on a phone that people stay to look at it.

The rest of this post goes through each row, in roughly the order we fix them when we audit a site.

What image SEO covers

Image SEO is the work of making images understandable to search engines and screen readers, and light enough not to slow the page down. In practice that means descriptive alt text, sensible file names, modern formats, correct sizing, careful lazy loading and image URLs that crawlers can actually find.

Google’s own image SEO best practices are the reference here. They say Google uses alt text, computer vision and the content of the page to work out what an image shows, and that nearby text such as captions helps. So an image is never judged alone. A perfect alt attribute on a page about something else will not carry it.

There is a second audience too. Under WCAG success criterion 1.1.1, non-text content needs a text alternative. In the US, ADA website complaints are a real legal risk, and in Ontario the AODA applies WCAG requirements to many organizations. We start with accessibility and let the SEO benefit follow.

Alt text for SEO: write it for someone who can’t see the image

Good alt text describes what the image shows, in the context of the page, in one short sentence. Write it as if you were describing the photo to a customer over the phone. If it reads naturally out loud, it is probably good for search too.

Good and bad alt text examples

ImageWeak alt textBetter alt textWhy
Product phototableSix-seat walnut dining table with tapered legsNames the product and the details a buyer cares about
Team photo on an About pageteam photo seo agency toronto best seoOur team outside the Hamilton officeThe stuffed version sounds like spam to a screen reader user and looks like spam to Google
Before and after of a roof repairroofAsphalt shingle roof before and after storm damage repairThe point of the image is the comparison, so say it
Chart in a blog postchartBar chart: organic leads rose every quarter in 2025A chart needs its takeaway; if the data matters, put it in the body text as well
Logo linking to the homepagelogo.pngAcme Plumbing homeA linked image’s alt text acts as the link’s anchor text, so describe the destination
Decorative dividerdividerEmpty: alt=""Decorative images should be skipped by screen readers

Decorative images get an empty alt, not a missing one

If an image adds nothing a reader would miss, give it an empty alt attribute: alt="". That tells assistive technology to skip it. A missing alt attribute is different and worse, because some screen readers fall back to reading the file name aloud. That is how people end up hearing “IMG underscore 4471 dash scaled dot j-p-g”. The W3C’s alt text decision tree is the quickest way to settle borderline cases.

The common mistake: auto-filled alt text

Several WordPress plugins offer to fill missing alt text automatically, usually by copying the file name or the post title. People switch this on because an audit tool reports 400 missing alt attributes, and the setting makes the number drop to zero overnight. The report looks clean. The site is no better. “IMG 4471 scaled” is not a description, and fifty product photos that all say “Walnut Dining Table” tell nobody which one is the side view.

AI-generated descriptions are better than file names, and for a large catalogue they can be a reasonable first draft. Check them anyway. They describe what is visible and miss what matters commercially, like the model name, the wood species or the fact that the photo shows the optional bench.

How long should alt text be?

Long enough to describe the image, short enough to listen to. Neither Google’s documentation nor WCAG sets a character limit; the often-quoted 125 characters is a rule of thumb that circulates in SEO tools, not a requirement. If you need more than a sentence or two, the information belongs in a caption or in the body text.

File names: boring and descriptive

Rename images before you upload them. Google’s guidelines say the file name gives it very light clues about the subject, so walnut-dining-table-six-seat.webp beats IMG_4471.jpg. Use lowercase words separated by hyphens, and stop there.

Two practical notes for WordPress sites:

  • Renaming after upload changes the image URL, and every page or external site that embeds the old URL breaks unless you redirect it. On an established site with thousands of images, fix names going forward and rename only the images that matter most.
  • If you run a French version of your site for Quebec, translate the file names along with the alt text. Google’s guidelines suggest localizing file names when you localize images.

Image formats: WebP, AVIF, JPEG, PNG or SVG?

For most photos, WebP is the safe default: current browsers support it, WordPress has accepted WebP uploads since version 5.8, and it is usually much smaller than an equivalent JPEG. AVIF can be smaller again, and WordPress has supported it since version 6.5, but it is slower to encode and still trips up some older plugins, CDNs and image editors.

Google Images can index BMP, GIF, JPEG, PNG, WebP, SVG and AVIF, so the format decision is about speed and compatibility, not about whether Google can read the file.

  • Photos: WebP, or AVIF if your whole stack handles it. JPEG as a fallback.
  • Screenshots and images with sharp text or transparency: PNG or lossless WebP.
  • Logos and icons: SVG, which stays sharp at every size. Only upload SVGs from sources you trust, because they can carry scripts; that is why WordPress blocks SVG uploads by default.

Here is the trade-off people don’t enjoy hearing. Converting a whole media library to WebP or AVIF with a plugin is easy to start and annoying to undo. Some plugins serve the new format by rewriting URLs, others through server rules, and switching approaches later can leave orphaned files or broken images. Pick one route (a plugin, a CDN such as Cloudflare’s image features, or converting before upload) and stay with it.

File size and dimensions

Upload images at roughly the largest size your theme displays them, then compress them. A phone photo is often around 4,000 pixels wide, while a blog content column is rarely wider than 800 to 1,200 pixels. The extra pixels cost load time and gain nothing.

WordPress helps more than people realise. It generates several sizes on upload and outputs a srcset, so a phone can download a smaller file than a desktop. That only works when the theme uses core image functions. Page builders and hard-coded <img> tags sometimes skip it, which is one reason a site with “optimized” images can still fail mobile speed tests. Heavy images are one of the usual suspects when a WordPress site is slow enough to cost you enquiries.

Set width and height attributes as well (WordPress adds them for images inserted through the editor), so the browser reserves space and the layout doesn’t jump while images load. That jump is measured as Cumulative Layout Shift, one of the Core Web Vitals covered in our technical SEO guide to Core Web Vitals and crawlability.

Lazy loading: helpful until it hits your hero image

Lazy loading delays offscreen images until the visitor scrolls near them, which saves bandwidth and speeds up the first view. Use it for images below the fold. Don’t use it for the main image at the top of the page.

That top image is often the Largest Contentful Paint element, and lazy-loading it makes the browser wait before it even requests the file. Since WordPress 6.3, core tries to prevent this by skipping loading="lazy" on the first images and adding fetchpriority="high" to the likely LCP image. Sliders, page builders and some optimization plugins override that logic, though, and it is common to find a hero image lazy-loaded twice, once by WordPress and once by a script.

For search, Google can see lazy-loaded images that use native loading="lazy", or a library that puts the real URL into the src attribute when the image enters the viewport. Google does not index CSS background images at all, so a product photo set as a section background in a page builder is invisible to Google Images.

This is the point where image SEO and site speed become the same job. If you want help with both, our WordPress speed optimization services cover image delivery, caching and Core Web Vitals together, because fixing one in isolation often just moves the bottleneck.

Image sitemaps: do you need one?

Most small sites don’t need a separate image sitemap. If your images sit in normal <img> tags on indexable pages, Google finds them by crawling. An image sitemap earns its place when images are loaded by JavaScript, or when a large catalogue makes you want an explicit list.

  • The WordPress core sitemap at /wp-sitemap.xml does not list images. Rank Math and Yoast can both include images in their post sitemaps, which covers most needs without a separate file.
  • Google’s image sitemap documentation now relies on the image location tag. The caption, title, geo location and licence tags were deprecated in 2022, so any guide telling you to fill them in is out of date.

A 20-minute image audit for a WordPress site

  1. Crawl with Screaming Frog. The free version covers 500 URLs. In the Images tab, filter for missing alt text, alt text over 100 characters and images over 100 KB, then export the list.
  2. Sort by importance, not by count. Start with the homepage, the top service pages and the best-selling products. Writing good alt text for 30 key images beats auto-filling 3,000.
  3. Run PageSpeed Insights on the homepage and one product or service page, on mobile. Note the LCP element and the image-related diagnostics: oversized files, missing dimensions, offscreen images that could wait.
  4. Check the hero image’s HTML. View the page source, find the first large image, and confirm it is not lazy-loaded.
  5. Open Search Console, go to Performance, and switch the search type to Image. If a store with hundreds of products shows close to zero image impressions, that is worth investigating.
  6. Listen to one page with a screen reader. VoiceOver is built into Macs and NVDA is free on Windows.

For stores, product images also feed Google Merchant Center listings, which have their own image rules; our ecommerce SEO guide covers product pages more broadly.

Image SEO FAQ

Does alt text help SEO?

Yes. Google says it uses alt text, together with computer vision and page content, to understand images, and alt text on a linked image works like anchor text. It is first an accessibility requirement, and writing it well for people is what makes it useful for search.

Is WebP or AVIF better for SEO?

Neither ranks better by itself, since Google indexes both. WebP is the safer default; AVIF is worth it if your plugins, CDN and editing tools all handle it.

Should every image have alt text?

Every image needs an alt attribute. Meaningful images need a real description, and purely decorative images should have an empty one.

Does Google read text inside images?

Don’t rely on it. Text baked into an image is invisible to screen readers and an unreliable signal for search engines, so keep headings, prices and menu items in HTML.

Do I need an image sitemap on WordPress?

Usually not a separate one. Let Rank Math or Yoast include images in the post sitemaps, and add a dedicated image sitemap only if images load through JavaScript or you run a very large catalogue.

Share LinkedIn X Facebook

Written by

Techlooker Editorial Team

Techlooker helps businesses in the USA and Canada grow through SEO and AI search, WordPress development, Salesforce and Power BI. Our team writes these guides from the work we do for clients.