Image SEO: filenames, alt text, size compression, and WebP
1. The two roles images play in SEO: image search and page performance
Many B2B websites treat image SEO as “stuff keywords into the filename.” That’s a misunderstanding. Images actually play two roles in SEO: a traffic source from Google Image Search, and the main drag on page load performance.
Here’s the counterintuitive part: stuffing keywords into filenames barely moves your image search ranking. Google mainly judges an image’s topic from page context, alt text, and the text around the image. Naming a file stainless-steel-flange-pn16.jpg is good practice, but naming it stainless-steel-flange-pn16-ansi-b16-5-industrial-flange.jpg won’t earn you a single extra image click.
What really affects SEO is file size. One uncompressed 2MB product image slows the whole page, dropping LCP from 1.8 seconds to 3.5 seconds, and you lose on both ranking and conversion. This is Core Web Vitals the most common point deduction.
| Image SEO factor | Direct impact on ranking | Indirect impact on CTR and conversion |
|---|---|---|
| File name | Very small | None |
| Alt text | Medium (image search) | Benefits both accessibility and image search |
| File size and format | Large (affects LCP) | Faster loads, lower bounce rate |
| Dimensions and srcset | Medium (mobile experience) | Mobile traffic conversion |
| ImageObject structured data | Small | Rich media result display |
and Media Asset Governance. That article covers naming, compression, and reuse workflows for images and video; this one focuses on the specific way to write images for SEO.
2. Filenames and alt text: what to write, what not to write
Filenames and alt text are often lumped together. The filename is read by servers and crawlers; alt text is read by screen readers and the image search index. They’re written differently.
| Element | Correct way to write it | Wrong approach |
|---|---|---|
| File name | stainless-flange-pn16.jpg | IMG_2038.jpg、DSC_0001.jpg |
| Alt text | Stainless steel flange PN16 pressure rating product photo | flange flange flange stainless |
| Alt for decorative images | alt=”” (empty) | alt=”divider”, alt=”image” |
| Length | Alt text 8 to 15 words | Alt text as a whole paragraph |
| Language | Match the page language | English site, Chinese alt text |
The core rule for alt text: imagine a screen reader is describing this image to a blind user. How would you say it? That is the Website accessibility (WCAG) requirement, and it is also the right way to do image SEO. Writing “Stainless steel flange PN16 pressure rating product photo” is enough. Do not write “This is an image showing a stainless steel flange with a PN16 pressure rating that meets ANSI B16.5, suitable for petrochemical pipelines” — that is keyword stuffing.
Decorative images (dividers, background patterns, icons) must have empty alt (alt=””). Do not write “divider”. A screen reader skips empty alt, but it will read out “divider”, which is just noise for blind users.
3. Size compression and WebP: thresholds and tools
Compression gives the best return on effort of anything in image SEO. A 2MB uncompressed product photo compressed to 200KB looks virtually identical to the eye, and load time drops from 4 seconds to 0.4 seconds.
| Format | Size vs JPEG | Best for | Compatibility |
|---|---|---|---|
| WebP quality 80 | 25% to 35% smaller | 2026 default | Supported by all modern browsers |
| AVIF | 50% smaller | Very slow network scenarios | Weaker compatibility, needs JPEG fallback |
| JPEG quality 80 | Baseline | Fallback format | All browsers |
| PNG | 2 to 5 times larger | Transparent backgrounds only | All browsers |
Three practical thresholds. Product hero images should be no wider than 1200px (anything larger is wasted); inline body images no wider than 1600px; thumbnails no wider than 400px. Use quality 80 across the board — quality 90 looks nearly identical to 80 but doubles the file size.
On the tooling side, WordPress sites can use ShortPixel or Imagify to convert to WebP automatically; self-hosted sites can batch process with the Sharp command line. A CDN can also do real-time format conversion, see Global CDN acceleration‘s image optimization strategy.
4. Hero image and LCP: why the hero image is the highest-priority image for SEO
The LCP (Largest Contentful Paint) metric in Core Web Vitals is the first image above the fold 80% of the time. Compressing that one image has a bigger impact on LCP than compressing 10 thumbnails at the bottom of the page.
| Hero image optimization action | Expected gain | Implementation cost |
|---|---|---|
| Convert to WebP | Size -30% | Low (plugin does it) |
| Compress to quality 80 | Size -60% | Low |
| Explicit width/height | CLS drops | Low (template change) |
| fetchpriority=”high” | LCP -0.5s | Low (add attribute) |
| srcset multiple sizes | 50% less mobile traffic | Medium (generate multiple sizes) |
Scenario 1: A product detail page hero image was originally a 2400px-wide, 1.8MB JPEG with an LCP of 3.8 seconds. After switching to 1200px wide, WebP quality 80, 220KB, plus fetchpriority=”high”, LCP dropped to 1.6 seconds and the main keyword ranking rose from 14th to 7th.
Scenario 2: A blog post hero image was a 1920px-wide cover PNG at 1.2MB. After converting to WebP it was 180KB, load time dropped from 2.4 seconds to 0.6 seconds, and mobile bounce rate fell from 65% to 41%.
Image localization for multilingual sites also needs to account for text embedded in graphics, see Charts and tables on multilingual sites Text inside images can’t be translated via alt text — you need a separate image for each language.
5. Common mistakes and pre-launch checklist
These are the five most common image SEO mistakes, and a single site-wide scan can catch every one of them.
| Mistake | How to diagnose | Fix actions |
|---|---|---|
| All alt text is empty | Scan the HTML and count the share of alt=”” | Product images and hero images must have alt text |
| Uncompressed original images | Count images over 300KB | Batch convert to WebP at quality 80 |
| Missing width/height | Lighthouse report | Add the attributes in the template to reduce CLS |
| Filenames like IMG_xxxx | Scan the uploads directory | Batch rename to descriptive names |
| Not using modern formats | Check the Content-Type | Turn on automatic WebP conversion at the CDN layer |
Image structured data (ImageObject) gives marginal gains for B2B product pages, and you can launch it alongside Structured data (Schema) But it ranks below compression and alt text — cut file size first, then worry about rich media.
6. Image sitemaps, copyright fields and lazy loading
Many people think image SEO is done once the alt text is written and the images are compressed, but three things are still missing. The first is an image sitemap. Besides HTML sitemaps, Google also lets you list image URLs, captions, titles and license fields in a sitemap. If product images and infographics rely only on the img tags on the page and wait for Google to crawl them slowly, new images can take two to three weeks to show up in image search; after you submit an image sitemap, indexing usually drops to three to five days. Image search traffic on B2B industrial sites is only 5% to 15% of organic traffic, but that traffic has strong buying intent, so you can’t give it up.
The second is copyright and license fields. Schema’s ImageObject supports three fields — license, acquireLicensePage and creditText — that state who owns the image and whether it’s licensed for commercial use. Nobody cares about this day to day, but when AI vision models train on your images, clear copyright fields are your basis for claiming your rights after the fact. Conversely, if you use paid stock images without stating the license on the page, you always run the risk of the original creator filing a complaint and getting them taken down.
The third is the conflict between lazy loading and the LCP image. The LCP hero image must load eagerly with fetchpriority=”high”; only the other body images should use loading=”lazy”. A common mistake is adding loading=”lazy” site-wide, which delays the hero image too and slows LCP by a full second. To check, look for the “Largest Contentful Paint image was lazily loaded” warning in Lighthouse — if it appears, the hero image has been given lazy by mistake.
| Gaps to close | How to do it | Benefit |
|---|---|---|
| Image sitemap | List image URLs in the XML sitemap | Speeds up image indexing by about two weeks |
| Copyright fields | Add license to ImageObject | Commercial licensing becomes traceable |
| Hero image loads eagerly | Don’t add lazy to the LCP image | LCP gets slower, not faster |
| Structured Data | Add ImageObject to product images | Rich media result display |
Images on multilingual sites have a separate problem: text inside an image can’t be translated with alt text. If an infographic shows Chinese specs, the English version needs a new image with English labels, not an alt tag trying to translate the words in the picture. Localizing charts and diagrams is expensive, but on multilingual sites that skip it, native-speaking buyers spot machine-translated images instantly and trust takes a hit. For this workflow, see Charts and tables on multilingual sites.
FAQ
Do image filenames have to contain keywords?
How long should alt text be?
How much smaller is WebP than JPEG?
What image file size in KB is acceptable?
How much does image SEO affect Google Image search traffic?
Which WordPress plugin should I use to optimize images automatically?
Final thoughts
Image SEO priorities are clear: compress the hero image first to fix LCP, then write alt text for accessibility and image indexing, and only then worry about semantic filenames. Do these three things and you’re already ahead of 80% of B2B sites still uploading 2MB originals.
Three steps, three weeks: this week, run Lighthouse on 20 key pages and list every page with an LCP over 2.5 seconds. Next week, convert those pages’ hero images to WebP in bulk, compress them to under 250KB, and add width/height and fetchpriority. In week three, scan the site for product images with empty alt text and rewrite them using the rule “describe the image in 8 to 15 words.”
One line worth remembering: image SEO isn’t about stuffing keywords into filenames, it’s about getting your hero image under 250KB. Speed up, and rankings and conversions follow.
