
Image SEO: Alt Text, Compression, and File Names Done Right
Images make your content more engaging, but handled carelessly they quietly drag down your rankings, slowing your pages and giving search engines nothing to understand them by. Handled well, they do the opposite: they load fast, rank in image search, and reinforce what your page is about. Image SEO is the craft of getting the details right, alt text, file names, compression, and formats, so your images help rather than hinder. This guide covers how to do image SEO properly.

Why image SEO matters
Image SEO matters on two fronts: performance and understanding. Unoptimized images are one of the most common causes of slow pages, and speed is a confirmed ranking factor, so heavy images hurt your rankings directly. At the same time, search engines rely on the signals you give them, alt text, file names, surrounding content, to understand what an image shows and when to surface it. Getting image SEO right therefore improves both how fast your pages load and how well they and their images rank. WordPress sites are a common offender, since every theme and plugin can generate its own image sizes, so image cleanup is a standard part of my WordPress SEO optimization service.
Write useful, descriptive alt text
Alt text is the most important image SEO attribute, serving both accessibility and search understanding. Write it to describe what the image actually shows, clearly and concisely, in the context of the page, including your target keyword only where it genuinely fits. Avoid keyword stuffing, which creates a poor experience and can work against you, and keep alt text reasonably short, generally under about a hundred characters. Good alt text helps visually impaired users and gives search engines the context they need, so it is worth writing thoughtfully for every meaningful image.
Use descriptive file names
Image file names are a confirmed SEO signal, and Google uses them to understand image content, especially when other context is limited, so they belong in any image SEO routine. Replace default names like IMG_4521.jpg with descriptive, keyword-relevant ones such as blue-leather-crossbody-bag.webp. Separate words with hyphens rather than underscores or spaces, keep names concise at a few words, and use lowercase. Naming your files descriptively before you upload them is a small habit that steadily strengthens how well your images are understood.
Compress every image
Compression is where image SEO most affects speed. Compressing images substantially shrinks file size without a visible loss of quality, which directly improves load times and Core Web Vitals. Aim to keep most images under a few hundred kilobytes, and be careful not to over-compress to the point where images look blurry or pixelated, since poor visual quality undermines trust, which is itself part of how your site is evaluated. Balancing small file sizes with acceptable quality is the heart of image compression.
Choose the right format
Format choice is a modern image SEO decision. WebP offers roughly 25 to 35 percent smaller files than JPEG at equivalent quality, supports transparency, and enjoys universal browser support, which makes it an excellent default. AVIF compresses even more, up to around 50 percent smaller than JPEG, though its browser support is still catching up and encoding is slower. For most sites, serving images as WebP delivers a big speed win with no real downside, so switching your images to modern formats is one of the easier high-impact image SEO improvements. Stores on Shopify get WebP served automatically through the platform’s CDN, so the image work a good Shopify SEO company does there shifts to file names, alt text and oversized hero images.
Set dimensions and lazy-load
Two technical touches complete strong image SEO. First, always specify explicit width and height on your images so the browser reserves space for them, which prevents the layout shift that hurts Cumulative Layout Shift and annoys users. Second, lazy-load images below the fold so they load only as the visitor scrolls toward them, which speeds up the initial page load. Together, these keep your pages fast and visually stable, supporting both your Core Web Vitals and a smooth reading experience.
Add context and image sitemaps
Search engines understand images partly from what surrounds them, so good image SEO places images near relevant text, with descriptive captions where they help. For image-heavy sites, including your images in an image sitemap, or ensuring your regular sitemap references them, helps search engines discover and index them. Providing this context and discoverability increases the chance your images appear in image search, which can be a meaningful source of traffic for visual, product, or how-to content.
Common image SEO mistakes to avoid
Plenty of sites undermine their image SEO with a few avoidable mistakes. The most common is uploading huge, unoptimized images straight from a camera or stock library, which balloons page weight and slows loading, one of the biggest drags on Core Web Vitals. Another is leaving alt text blank or stuffing it with keywords, both of which waste the single most important signal an image can carry. A third is keeping default file names like IMG_4521.jpg, which tell search engines nothing, when a descriptive name would help them understand the image.
The other frequent errors are technical. Sites often omit width and height attributes, causing the layout to jump as images load and hurting Cumulative Layout Shift, or they skip lazy loading, so every image loads at once and slows the initial render. Some still serve dated formats like large JPEGs when modern WebP would cut file sizes substantially at the same quality. Avoiding these mistakes is straightforward: compress every image, use descriptive file names and alt text, serve modern formats, set explicit dimensions, and lazy-load below the fold.
Because images appear on nearly every page, small improvements to your image SEO compound across your whole site, speeding up load times, strengthening your rankings, and opening up traffic from image search. It is unglamorous, detail-oriented work, but building good image habits, optimizing before you upload and writing thoughtful alt text every time, quietly pays off across everything you publish. Sites that treat images as an afterthought carry needless weight, while those that handle them well enjoy faster, better-understood pages as a matter of routine.
None of this requires special expertise, just consistent habits applied every time you add an image. Compress and rename before uploading, write genuine alt text, serve modern formats, and let your tools handle dimensions and lazy loading. Do that routinely and your image SEO takes care of itself, quietly keeping your pages fast and well-understood without any dramatic effort. Given how many images a typical site accumulates, these small, repeatable habits add up to a meaningful advantage over competitors who upload whatever they have and never think about it again.
Frequently asked questions
What is the most important part of image SEO?
Descriptive alt text and compression matter most: alt text tells search engines and screen readers what an image shows, while compression keeps your pages fast, which directly affects rankings and user experience.
How should I write image alt text?
Describe what the image shows clearly and concisely in the context of the page, including your keyword only where it fits naturally. Avoid keyword stuffing and keep it under about a hundred characters.
What image format is best for SEO?
WebP is an excellent default, offering 25 to 35 percent smaller files than JPEG at similar quality with universal support. AVIF compresses even more but has more limited browser support so far.
Do image file names affect SEO?
Yes. File names are a confirmed signal Google uses to understand image content, so descriptive, hyphen-separated, lowercase names like blue-leather-bag.webp beat defaults like IMG_4521.jpg.
How small should my images be?
Aim to keep most images under a few hundred kilobytes through compression and modern formats, while avoiding over-compression that makes images look blurry, since poor quality undermines user trust.
Free SEO audit · No signup
Reading about SEO is good. Knowing your score is better.
Run a free SEO + GEO + AEO audit of your website — results in about 15 seconds, downloadable as a PDF.