How to optimize images for SEO: compress and size them, use descriptive filenames and alt text, pick modern formats, and lazy-load — for speed and search.
How to Optimize Images for SEO
To optimize images for SEO, compress them and size them correctly, use modern formats and lazy loading so they don’t slow your page, and give them descriptive filenames and alt text so search engines understand them. The two payoffs are different: the performance work helps your whole page (speed matters more than most people think), and the descriptive work helps your images get found in image search. Here’s the step-by-step.
This guide separates the speed wins from the discovery wins, so you know what each step actually does.
The two goals of image SEO
Worth knowing up front, because it clarifies everything: image optimization does two separate jobs.
- Performance (helps your whole page): compressing, sizing, modern formats, and lazy loading make the page faster — and page speed affects user experience and is a (modest) ranking factor. This is usually the bigger practical payoff.
- Discovery (helps images get found): descriptive filenames, alt text, and context help images rank in Google Images and help engines understand them.
Do both, but know which step serves which goal.
Step 1 — Compress your images (speed)
Large image files are the #1 cause of slow pages. Compress every image so it’s as small as possible without visible quality loss, using an image compressor or your CMS’s optimization. This alone often produces the biggest page-speed gain.
Step 2 — Size images correctly (speed)
Don’t serve a giant image into a small space. Resize images to the dimensions they’re actually displayed at — serving a 3000px-wide image into a 400px slot wastes huge bandwidth. Use responsive images (srcset) to serve appropriately sized versions to different devices.
Step 3 — Use modern formats (speed)
Modern formats like WebP (and AVIF) offer much smaller file sizes than older JPEG/PNG at the same quality. Serving images in a modern format is one of the easiest speed wins, with wide browser support today.
Step 4 — Use descriptive filenames (discovery)
Before uploading, name the file for what it is: red-leather-office-chair.jpg, not IMG_4823.jpg. Descriptive, keyword-relevant filenames (words separated by hyphens) help search engines understand the image and can help it rank in image search.
Step 5 — Write good alt text (discovery + accessibility)
Alt text describes the image for screen readers (accessibility) and for search engines that can’t “see” the image. Write genuinely descriptive alt that conveys what the image shows, naturally including a relevant keyword only where it fits. Don’t keyword-stuff alt text — describe the image accurately. (See how to write alt text for the full method.)
Step 6 — Lazy-load below-the-fold images (speed)
Lazy loading defers loading images until they’re about to scroll into view, so the initial page loads faster. Most modern platforms support it (often via loading="lazy"). Apply it to below-the-fold images so they don’t delay the initial render.
Step 7 — Add context and a sitemap (discovery)
Images are understood partly by the content around them — place them near relevant text with descriptive captions where appropriate. For image-heavy sites, an image sitemap (or including images in your sitemap) helps Google discover them. Context tells search engines what the image is about beyond the file itself.
The bottom line
Optimize images for both goals: the performance work (compress, size, modern format, lazy-load) speeds up your whole page — usually the bigger win — and the discovery work (filenames, alt text, context) helps images get found. Do both and you get a faster site and image-search visibility. (Web design builds sites with images optimized from the start — or run a start with a free audit.)
Frequently asked questions
How do I optimize images for SEO? Compress your images and size them to the dimensions they’re displayed at, use modern formats like WebP, and lazy-load below-the-fold images so they don’t slow your page. Then give each image a descriptive, keyword-relevant filename and write genuinely descriptive alt text, and place images near relevant content. The performance steps speed up your whole page, while the descriptive steps help images get found in image search.
Does image optimization affect page speed? Yes, significantly. Large, unoptimized images are the most common cause of slow pages, so compressing them, sizing them correctly, using modern formats like WebP, and lazy-loading them are among the most effective ways to speed up a website. Since page speed affects user experience and is a modest ranking factor, image optimization’s biggest practical payoff is often the speed improvement to your whole page.
What is the best image format for SEO? Modern formats like WebP (and AVIF) are generally best because they offer much smaller file sizes than older JPEG and PNG formats at comparable quality, which improves page speed. WebP has wide browser support today, making it a practical default for most images. Choosing a modern, well-compressed format is one of the easiest ways to reduce image weight and speed up your pages.
Do image filenames matter for SEO? Yes. Descriptive, keyword-relevant filenames — like red-leather-office-chair.jpg rather than IMG_4823.jpg — help search engines understand what an image shows and can help it rank in image search. Name files for what the image actually is, using words separated by hyphens, before uploading. It’s a small step, but it contributes to how well your images are understood and discovered.
What is alt text and why does it matter? Alt text is a written description of an image that screen readers announce for accessibility and that search engines use to understand images they can’t see. It matters for both making your site accessible to visually impaired users and helping images get found in search. Write genuinely descriptive alt text that conveys what the image shows, including a relevant keyword only where it fits naturally, without stuffing.
Should I lazy-load images? Yes, for below-the-fold images. Lazy loading defers loading images until they’re about to scroll into view, so the initial page loads faster and doesn’t waste bandwidth on images the visitor may never reach. Most modern platforms support it, often via the loading=“lazy” attribute. Apply it to images below the fold, but generally load above-the-fold images normally so they appear immediately.
How do I get my images to rank in Google Images? Help Google understand and trust your images: use descriptive filenames and alt text, place images near relevant, high-quality content that provides context, use appropriate captions, ensure images load fast, and include them in your sitemap. Google Images rankings draw on both the image itself and the page it’s on, so relevant, well-optimized images on strong, relevant pages have the best chance of ranking.
Written by Bryan Collins, SEO & AEO strategist. Want images optimized from the start? See web design services or run a free local search audit.