Muhammad Basim
Pin for Image SEO: Alt Text, File Size and What Ranks
SEO

Image SEO: Alt Text, File Size and What Ranks

Muhammad Basim
Muhammad Basim
·8 min read

✦Part of the comprehensive guide on: On-Page SEO: The Complete Checklist

Image SEO - Alt Text, File Size and What Ranks

Image SEO is two separate jobs that get discussed as one: describing images so machines understand them, and delivering them fast enough not to damage the page. The first affects image search and accessibility. The second affects every visitor and your Core Web Vitals.

For most sites the second matters far more, because images are the single most common reason a page fails Largest Contentful Paint — and LCP is one of the three metrics Google actually reports on.


Alt text

Google's own words: alt text is "the most important attribute when it comes to providing more metadata for an image." It uses that alt text alongside computer vision and the surrounding page content to work out what an image shows.

It is also, first and foremost, an accessibility feature. Someone using a screen reader hears your alt text in place of the image, and writing it primarily for search engines produces something that fails the person it exists for.

What good alt text looks like:

  • Describes what the image shows, specifically — DMARC record shown in a DNS panel, with the _dmarc host highlighted
  • The length it needs to be and no more. No character limit exists; a sentence is usually right
  • No "image of" or "picture of" — screen readers already announce that it is an image
  • Keywords only where they occur naturally. Google's guidance warns against stuffing and asks for useful, information-rich text in context

When alt text should be empty:

Purely decorative images — dividers, background flourishes, an icon next to a heading that repeats it — should have alt="". Empty, not missing. An empty alt tells a screen reader to skip it; a missing alt makes it read the filename aloud.

The test: if the image vanished, would the alt text tell someone what they missed? That is the whole standard, and it satisfies both audiences at once.


Filenames

Google asks for filenames that are "short, but descriptive," and gives its own example: my-new-black-kitten.jpg beats IMG00023.JPG.

Rename before uploading. Renaming afterwards means changing the URL of a file that may already be linked or indexed, and it is rarely worth it retrospectively. Hyphens, lower case, a few words.

This is a small signal. Worth doing at upload because it costs nothing; not worth a project.


The part that actually matters: performance

Images are the most common cause of a failed Largest Contentful Paint, and LCP is one of the three Core Web Vitals Google reports. The target is under 2.5 seconds.

Five things, in order of effect.

1. Serve the right dimensions

The most common and most wasteful error: a 3000-pixel-wide photograph displayed in a 700-pixel column. The browser downloads all of it and throws most of it away.

Resize before uploading. Nothing downstream fixes this as cheaply.

2. Use a modern format

Google Search supports images in BMP, GIF, JPEG, PNG, WebP, SVG and AVIF.

WebP is the sensible default — broad support, substantially smaller than JPEG at equivalent quality. AVIF is smaller again. SVG for logos, icons and diagrams, because it scales without loss and is usually tiny.

3. Compress

Most photographs are visually indistinguishable at 80% quality and a fraction of the size. Run everything through compression as part of upload rather than as an occasional cleanup.

4. Set width and height attributes

This is the Cumulative Layout Shift fix. Without explicit dimensions the browser does not reserve space, so content jumps when the image loads. Setting width and height — even with responsive CSS — lets the browser reserve the right box immediately.

Cheap, invisible, and it fixes an entire Core Web Vital.

5. Lazy-load below the fold, never above it

loading="lazy" on images below the fold saves bandwidth. Applying it to your hero image delays the very element LCP measures, which is the opposite of the intent.

Plugins that lazy-load everything by default cause this constantly. Check that your above-the-fold image is excluded.

Responsive images

Google supports srcset and the <picture> element, and asks that a fallback src remains for compatibility. Modern CMSs generate srcset automatically — the thing to verify is that the generated sizes match the sizes your layout actually uses.


Image sitemaps and CDNs

Image sitemaps help discovery where images are loaded in ways a crawler may miss — via JavaScript, or from a separate domain.

Google permits image URLs from other domains in your sitemap, which is what makes CDN delivery workable. If you serve images from a CDN, verify that CDN's ownership in Search Console so crawl errors reach you.

For most WordPress sites the SEO plugin already generates image entries. This is a check, not a task.


What does not work

Keyword-stuffed alt text. Named directly in Google's guidance as something to avoid, and it degrades the experience for screen reader users, which is the audience alt text exists for.

Alt text on decorative images. Use alt="". Describing a divider line adds noise.

Text baked into images. Anything that must be read, indexed, or translated should be real text. This includes headings rendered as graphics, which is more common than it should be.

Renaming every historic file. Changing URLs on already-indexed images to gain a weak signal is a poor trade.

Assuming a plugin handled it. Optimisation plugins have defaults, and the default is frequently "lazy-load everything", which breaks LCP. Verify on a rendered page.


The check worth running

  1. Open your most important page on a phone-shaped viewport
  2. Note what the largest visible element is — usually an image
  3. Check its actual transfer size in the browser's network panel
  4. Check whether it has width and height attributes
  5. Check whether it is being lazy-loaded

Those five checks find nearly every image problem worth fixing, and none needs a tool beyond the browser you already have. The Core Web Vitals field data in Search Console then tells you whether it mattered for real visitors — the reports are covered in Search Console: the 5 reports that matter.


Frequently asked questions

What should alt text say?
What the image shows, specifically, in about a sentence. Google calls alt text the most important metadata for an image and uses it alongside computer vision and page content. Skip "image of" — screen readers announce that already — and avoid keyword stuffing, which Google's guidance names directly.

Do decorative images need alt text?
They need an empty alt attribute — alt="" — rather than no alt attribute at all. Empty tells a screen reader to skip the image; missing makes it read the filename aloud, which is worse than silence.

What image format is best for SEO?
Google Search supports BMP, GIF, JPEG, PNG, WebP, SVG and AVIF. WebP is a sensible default for photographs given its support and size, AVIF is smaller again, and SVG suits logos, icons and diagrams because it scales losslessly at a tiny file size.

Do image filenames matter?
A little. Google asks for short, descriptive filenames and contrasts my-new-black-kitten.jpg with IMG00023.JPG. Rename before uploading, because renaming afterwards changes the URL of a file that may already be indexed — rarely a worthwhile trade.

Why do images hurt Core Web Vitals?
Because the largest visible element on a page is usually an image, which makes it the thing Largest Contentful Paint measures. Oversized dimensions, uncompressed files, and lazy-loading an above-the-fold image are the three most common causes of a failed LCP.

Should I lazy-load all images?
No. Lazy-load below the fold, never above it. Applying it to the hero image delays the exact element LCP measures. Optimisation plugins frequently default to lazy-loading everything, so verify your above-the-fold image is excluded.

Do width and height attributes still matter?
Yes, and they fix an entire Core Web Vital. Without them the browser cannot reserve space before the image loads, so content shifts as it arrives — which is what Cumulative Layout Shift measures. Set them even when CSS handles the responsive sizing.

Do I need an image sitemap?
Only if images are loaded in ways a crawler might miss, such as through JavaScript or from a separate domain. Google allows image URLs from other domains in a sitemap, which supports CDN use — and if you use one, verify that CDN in Search Console so crawl errors reach you.


What to do next

Open your most important page, find the largest image, and check its transfer size in the browser's network panel. If it is over a few hundred kilobytes, that is your Largest Contentful Paint problem and it is fixable this afternoon.

Then check whether that image has width and height attributes and is not being lazy-loaded. Those two checks catch the majority of image-caused Core Web Vitals failures.


Related guides

Free: The 60-Minute Email Authentication Fix

A no-fluff checklist to set up SPF, DKIM & DMARC correctly and pass Gmail & Yahoo's sender requirements.

Muhammad Basim

About the Author

Muhammad Basim

Digital Marketer & WordPress Developer

Muhammad Basim has worked in digital marketing since 2013, focused on email deliverability and AI-assisted content production. He is the author of The Email Deliverability Playbook and The Email Copywriting Playbook.

Related Articles

Newsletter

Free: The 60-Minute
Email Authentication Fix

A no-fluff checklist from the Deliverability Playbook. In one hour: set up SPF, DKIM & DMARC correctly, check your domain against blocklists, and pass Gmail & Yahoo's 2026 sender requirements.

No spam — that would be ironic. Unsubscribe anytime.