Key Takeaways:
- Alt texts are the most important SEO element for images and should precisely describe the content
- Modern formats like WebP reduce file sizes by 25-35% with equal quality
- Descriptive file names help Google understand image content
Google Image Search generates billions of searches daily. Yet many websites completely neglect their image SEO. The optimization is neither complicated nor time-consuming – if you know what matters.
Well-optimized images bring traffic from image search, improve user experience, and can even appear as rich results in regular search results. At the same time, they're crucial for your website's loading speed.
Alt Texts: The Heart of Image SEO
The alt text (alternative text) describes the image content. It appears when the image can't load and is read aloud by screen readers. For Google, it's the most important signal to understand image content.
A good alt text is precise and descriptive. Instead of "image" or "photo," describe what's actually visible. Stay natural and don't force keywords.
Alt Text Examples
| Poor | Good |
|---|---|
| image1.jpg | Golden Retriever playing in park with red ball |
| Photo | Barista preparing cappuccino with latte art |
| Banner | Modern office setup with wooden desk and plants |
| IMG_4523 | Sunset over the Sydney Opera House |
For decorative images without content meaning – like dividers or background patterns – you can leave the alt text empty (alt=""). This tells screen readers they can skip the image.
Optimizing File Names
Before uploading an image, name the file meaningfully. Google reads file names and uses them as an additional signal.
Use descriptive words instead of number combinations. Separate words with hyphens, not underscores. Keep names short but meaningful.
Before: DSC_4892.jpg After: handmade-leather-bag-brown.jpg
For multilingual websites, you can use file names in the respective language. This strengthens local relevance.
Choosing the Right Image Format
Different formats suit different use cases. The right choice saves storage without quality loss.
| Format | Ideal For | Advantages |
|---|---|---|
| WebP | General use | Smallest file size, good quality |
| AVIF | Modern browsers | Even smaller than WebP |
| JPEG | Photos | Broad support |
| PNG | Transparency, screenshots | Lossless compression |
| SVG | Logos, icons | Scalable without quality loss |
WebP should be your standard format in 2025. It's supported by all modern browsers and offers the best balance of quality and file size. For maximum compatibility, you can offer JPEG as a fallback.
Image Size and Compression
Large image files are the most common reason for slow websites. An uncompressed photo from a camera can easily be 5 MB – far too much for the web.
The optimal approach:
-
Right dimensions: Don't upload images larger than necessary. An image displayed at 800 pixels wide doesn't need 4000 pixels width.
-
Apply compression: Tools like TinyPNG, Squoosh, or ImageOptim reduce file size without visible quality loss.
-
Use responsive images: With srcset, you can offer different sizes for different screens.
As a rule of thumb: Most web images should stay under 200 KB. Hero images or large banners can be slightly larger, but rarely more than 500 KB.
Implementing Lazy Loading
Lazy loading means images only load when they scroll into view. This significantly speeds up initial page load.
Modern HTML supports lazy loading natively with the loading attribute:
<img src="image.webp" alt="Description" loading="lazy">
Images in the immediately visible area (above the fold) should not be lazy loaded. That would worsen Largest Contentful Paint (LCP).
Structured Data for Images
With structured data, you can tell Google additional information about your images. Particularly relevant are:
- Product markup: Shows price and availability in image search
- Recipe markup: Enables display in recipe carousels
- How-to markup: Labels step images in tutorials
These markups can lead to rich results that get more attention in search results.
Using a Content Delivery Network
A CDN distributes your images to servers worldwide. Visitors load images from the nearest server, shortening load times.
For international websites, a CDN is almost mandatory. But even with domestic audiences, it can help handle traffic spikes and improve performance.
Many hosting providers and website builders already integrate CDN features. Cloudflare, Bunny CDN, or imgix are popular options.
Creating an Image Sitemap
An image sitemap helps Google find and index all your website's images. It's especially important when images are loaded via JavaScript.
In an image sitemap, you list each image's URL along with optional metadata like title and description. Most CMS can generate image sitemaps automatically.
Check your image optimization with our Speed Analyzer and see where there's room for improvement.
Frequently Asked Questions
How long should an alt text be?
Alt texts should be precise, typically between 5 and 15 words. Describe the image content completely but without unnecessary filler words. Very long alt texts may be truncated by some screen readers.
Should I put keywords in alt texts?
Keywords can be part of an alt text if they fit naturally. An image of a red apple can be called "red apple on wooden table." But avoid keyword stuffing: "apple buy apple cheap apple fruit dealer" would be too much.
Do I need to optimize all old images on my website?
Prioritize by traffic and importance. Start with images on heavily visited pages and work your way through. For new content, use optimized images from the start.