Image SEO: Alt Text, File Names and Compression
Images are SEO and speed. How to name files, write alt text, choose formats and compress — so images help rankings instead of slowing you down.
Images make content engaging, but they are also one of the biggest causes of slow pages — and a frequently wasted SEO opportunity. Image SEO is about getting both right: images that help search engines understand your page and bring traffic from image search, without dragging down your speed. This guide covers file names, alt text, formats and compression.
Name image files descriptively
A file called DSC_00492.jpg tells search engines nothing. Rename images to describe what they show,
using lowercase words separated by hyphens — for example red-running-shoes-side-view.jpg. Descriptive,
keyword-relevant file names are a small but genuine signal for image search, and they keep your media library
manageable.
Write useful alt text
Alt text (the alt attribute) is the single most important image SEO element. It makes
images accessible to screen-reader users, gives search engines context, and displays if the image fails to load.
Describe what the image actually shows in plain language, keep it concise, and include a keyword only where it reads
naturally. Purely decorative images should have an empty alt attribute so assistive technology skips them. A full
Website SEO Checker audit flags images that are missing alt
text so you can fix them.
Choose the right format
- WebP / AVIF — best for photos; far smaller than JPEG at the same quality, and widely supported.
- JPEG — a safe, universal fallback for photographs.
- PNG — for images needing transparency or crisp edges, such as logos and screenshots.
- SVG — for icons and simple vector graphics; it scales to any size with no quality loss.
Compress and right-size
The most common image mistake is serving a huge file scaled down in the browser — the visitor still downloads every byte. Export images at the dimensions they are actually displayed, then compress them. Thoughtful compression often cuts file size by half or more with no visible difference. Because images are usually the largest element on a page, this directly improves Largest Contentful Paint — see our Core Web Vitals guide.
Help the browser load images efficiently
- Set width and height so the browser reserves space and the layout does not shift as images load (good for Cumulative Layout Shift).
- Lazy-load below-the-fold images so they load only when needed.
- Preload the single most important above-the-fold image (often the hero) so it appears fast.
- Serve responsive sizes so phones download smaller images than desktops.
Measure the impact
After optimising, confirm the win. A Page Speed Test shows your total page weight and request count, and the HTTP Header Checker confirms compression and caching headers are set. Good image SEO is one of the rare changes that improves accessibility, speed and rankings all at once.
Images are one line on the wider on-page SEO checklist — get them right alongside your titles, headings and content.