How to Optimise Images for SEO
Images are a crucial part of web content, but they can also be one of the biggest drags on page speed and SEO if not optimised properly. Image optimisation covers alt text, file names, dimensions, compression, format choice, and lazy loading.
1. Alt Text
Alt text (alternative text) describes the image for screen readers and search engines. It is also displayed when the image fails to load.
| Bad Alt Text | Good Alt Text |
|---|---|
alt="" (empty) | alt="Red Nike running shoe on trail path" |
alt="image" | alt="SEO score dashboard showing 92 out of 100" |
alt="IMG_4521.jpg" | alt="Chocolate cake with cream frosting on white plate" |
Be specific and descriptive. Include the target keyword naturally if it fits. For decorative images (borders, spacers), use alt="" to skip them.
2. File Names
Name your image files descriptively before uploading. red-nike-running-shoe.jpg is better than IMG_4521.jpg. Use hyphens to separate words and keep names lowercase.
3. Image Dimensions
Always include width and height attributes on your <img> tags. Without them, the browser does not know how much space to reserve, causing Cumulative Layout Shift (CLS). Check with the image dimensions checker.
4. Lazy Loading
Add loading="lazy" to images that are below the fold. This defers loading until the user scrolls near them, improving initial page load speed. Do not lazy-load your hero image or logo — those should load immediately. Check with the lazy loading checker.
5. Image Compression
Large image files slow down your page. Compress images before uploading:
- Photos: aim for under 200KB per image
- Use tools like TinyPNG, Squoosh, or ImageOptim
- Reduce resolution to the maximum display size (no point uploading 4000px wide images that display at 800px)
6. Image Format
| Format | Best For | Browser Support |
|---|---|---|
| WebP | Most images (photos + graphics) | All modern browsers |
| AVIF | Best compression, newest format | Most modern browsers |
| JPEG | Photos (fallback) | Universal |
| PNG | Graphics with transparency | Universal |
| SVG | Icons and logos | Universal |
Use WebP as your primary format with JPEG/PNG fallbacks for older browsers.
Check your images with a free RankNibbler audit — it checks alt text, lazy loading, and dimensions for every image on the page.
Last updated: March 2026