Image SEO: How Alt Text, Filenames, and Compression Affect Your Rankings
Images are often an overlooked part of SEO. Getting them right can drive meaningful traffic from Google Images and improve your overall search rankings.
Images are one of the most overlooked elements of SEO. A well-optimized image improves your page's loading speed (a direct ranking factor), provides search engines with context about your page's content, and can drive significant traffic from Google Images. Done poorly, images slow your site down and miss easy ranking opportunities. Here's how to get them right.
Why image SEO matters
Google Images is the second most used search engine in the world — used for product research, reference images, recipe photos, travel inspiration, and more. Images that rank in Google Images drive real traffic.
Beyond direct image search traffic, image optimization affects:
Core Web Vitals: Largest Contentful Paint (LCP) — one of Google's key ranking signals — is often determined by the largest image on the page. Unoptimized images cause poor LCP scores and lower rankings.
Page load speed: Images typically account for 60–70% of a page's total size. Compressed, correctly sized images are the single biggest lever for improving load speed.
Content relevance signals: Google reads image alt text, filenames, captions, and surrounding text to understand what a page is about. Well-described images reinforce your page's topic and help it rank for related queries.
1. Filenames: the easiest win
Most people save images with meaningless filenames: IMG_4892.jpg, screenshot_001.png, photo.jpg. These provide no information to search engines.
Descriptive filenames are a small but consistent SEO signal.
Before: IMG_4892.jpg
After: red-leather-bifold-wallet-front-view.jpg
Best practices for image filenames:
- •Use lowercase letters and hyphens between words (not underscores or spaces)
- •Be specific and descriptive:
mens-brown-leather-oxford-shoes.jpgis better thanshoes.jpg - •Include the primary keyword you want the image to rank for, used naturally
- •Keep filenames reasonably short — 3 to 6 words is usually sufficient
- •Rename files before uploading; changing a filename after publishing requires updating all references
2. Alt text: the most important image SEO element
Alt text (the alt attribute on <img> tags) serves two purposes: it describes images for visually impaired users using screen readers, and it tells search engines what the image depicts. It's the most important factor for image search rankings.
<!-- Poor -->
<img src="product.jpg" alt="image">
<!-- Good -->
<img src="red-leather-bifold-wallet.jpg" alt="Red leather bifold wallet open showing card slots and cash compartment">Alt text best practices:
- •Be specific and descriptive — write what you would say to someone who can't see the image
- •Include your target keyword naturally, but don't keyword-stuff
- •For product images, include the product name, key features, and color/material
- •For decorative images that add no informational value, use an empty alt attribute (
alt="") rather than omitting it - •Keep alt text under 125 characters — screen readers typically truncate longer text
- •Don't start with "Image of..." or "Photo of..." — Google knows it's an image
3. File size and loading speed
Google's Page Experience signals use loading speed as a ranking factor. Large, unoptimized images are the most common cause of slow pages.
Core Web Vitals targets:
- •LCP (Largest Contentful Paint): Under 2.5 seconds
- •The LCP element is most commonly a hero image or large content image
Optimization targets:
- •Hero/banner images: Under 200 KB
- •Product images: Under 150 KB
- •Thumbnail/card images: Under 40 KB
- •Blog post inline images: Under 100 KB
Use WEBP format for the best compression. WEBP files are typically 25–35% smaller than equivalent-quality JPG files. All modern browsers support WEBP.
Use BG Bueno's Image Compressor to reduce file sizes and BG Bueno's Image Resizer to ensure images aren't larger than their display dimensions.
4. Image dimensions and responsive images
Serving an image that's 4000 pixels wide to display in a 400-pixel column is wasteful — the browser downloads all 4000 pixels and then scales it down. This wastes bandwidth and slows loading.
Resize images to the maximum size they'll actually be displayed at. If a blog post shows images at a maximum width of 800px, serve an 800px image.
For responsive websites that show images at different sizes on different screens, use the srcset attribute to serve different image sizes:
<img
src="product-800.jpg"
srcset="product-400.jpg 400w, product-800.jpg 800w, product-1200.jpg 1200w"
sizes="(max-width: 600px) 400px, (max-width: 1000px) 800px, 1200px"
alt="Red leather bifold wallet"
>This tells the browser which image file to download based on the current viewport size.
5. Image sitemaps
An image sitemap (or adding image tags to your existing XML sitemap) tells Google about all the images on your site and helps them get indexed faster.
<url>
<loc>https://example.com/product/red-wallet</loc>
<image:image>
<image:loc>https://example.com/images/red-leather-wallet.jpg</image:loc>
<image:title>Red Leather Bifold Wallet</image:title>
<image:caption>Front view of red leather bifold wallet with card slots</image:caption>
</image:image>
</url>6. Captions and surrounding text
Text near an image — particularly captions directly below it — provides contextual signals that help Google understand what the image shows and what it's relevant to.
Captions are also read by users more often than body text, making them valuable for engagement as well as SEO. A short, descriptive caption that adds information (not just repeating the alt text) is worth adding for important images.
Quick checklist
Before publishing any page with images:
- •[ ] Descriptive filename using hyphens, no spaces
- •[ ] Meaningful alt text describing the image content
- •[ ] File size compressed to target (under 150 KB for most images)
- •[ ] Format: WEBP preferred, JPG for photos where WEBP isn't supported
- •[ ] Width: no larger than the maximum display size
- •[ ] Width and height attributes specified in the HTML to prevent layout shift
- •[ ] Captions added where they add value
BG Bueno tools
BG Bueno's own image tools are free to use, with no account required, and your files stay in your browser.
Keep reading