To optimize images for SEO, compress every image before uploading, use a modern format like WebP, give each file a descriptive filename, write helpful alt text, and size images to fit your page layout. Optimized images make your pages load faster — which Google rewards — and they can also rank in Google Image Search, bringing you extra traffic most sites ignore.
In This Article
- Why Do Images Matter for SEO?
- How Do You Compress Images Without Losing Quality?
- What Image Format Should You Use?
- How Do You Write Good Alt Text?
- What Makes a Good Image Filename?
- How Big Should Your Images Be (Dimensions)?
- Should You Add Image Sitemaps or Structured Data?
- Frequently Asked Questions
- Does Google really rank images separately?
- How many images should a blog post have?
- Is WebP really better than JPEG?
- Do background images need alt text?
- Can too many images hurt my SEO?
Images are often the heaviest thing on a page. One uncompressed photo can weigh more than all your text, code, and styling combined. That slows everything down, and slow pages lose visitors and rankings. The fix isn’t hard — it’s just a habit. Here’s the full process, step by step.
Why Do Images Matter for SEO?
Images affect SEO in three ways, and most site owners only think about the first one.
First, page speed. Google uses page speed as a ranking factor, and images are usually the biggest contributor to slow load times. A page that loads in 2 seconds keeps readers; a page that takes 8 seconds loses many of them before they read a word. Compressing your images is often one of the fastest ways to speed up a website. Oversized images are also a common drag on Core Web Vitals scores.
Second, accessibility and understanding. Search engines can’t “see” images the way you do. They rely on your filename, alt text, and surrounding content to figure out what an image shows. Well-labeled images help Google understand your page’s topic better.
Third, image search traffic. Google Images drives a surprising amount of visits for many sites — especially in niches like food, DIY, fashion, travel, and home improvement. Every optimized image is another chance to show up there. That makes image search a straightforward win worth the small effort.
How Do You Compress Images Without Losing Quality?
Compression shrinks a file’s size by removing data the human eye barely notices. Done right, a compressed image looks identical to the original but can load noticeably faster.
You have two options:
- Compress before uploading. Use a free tool like TinyPNG, Squoosh (Google’s free web app), or ImageOptim on Mac. Drag your image in, download the smaller version, then upload that. This is the most reliable method.
- Use a plugin. WordPress plugins like ShortPixel, Imagify, or Smush compress images automatically when you upload them. They’re convenient, but check the results — aggressive settings can blur detailed photos.
Aim for these file size targets:
- Large hero or banner images: under 200 KB
- Regular content images: under 100 KB
- Small icons and thumbnails: under 30 KB
If your “optimized” image is still 1.5 MB, something went wrong — try a stronger compression setting or a different format. And always keep a backup of your originals somewhere safe, in case you ever need the full-quality version.
What Image Format Should You Use?
The format you choose affects both file size and quality. Here’s the short version of what to use in 2026:
- WebP — your default choice for photos and most images. It produces files roughly a quarter to a third smaller than JPEG at the same quality — though actual savings vary widely by image and settings — and every modern browser supports it.
- JPEG — still fine for photographs if your tools don’t support WebP. Just compress them well.
- PNG — use only when you need transparency (like logos) or crisp graphics with sharp edges. PNG files are much larger, so never use them for photos.
- SVG — perfect for logos, icons, and simple illustrations. SVGs are code, not pixels, so they’re tiny and stay sharp at any size.
- AVIF — even smaller than WebP, but support and tooling are still catching up. Worth watching, not yet a must.
If you’re on WordPress, most modern versions handle WebP uploads natively, and compression plugins can convert your older JPEGs automatically. Switching a site’s images to WebP is one of the highest-impact speed fixes you can make. If you’re working through a broader speed project, our guide to improving Core Web Vitals in WordPress covers the other fixes alongside images.
How Do You Write Good Alt Text?
Alt text (alternative text) is a short description of an image that serves two purposes: screen readers read it aloud for visually impaired visitors, and search engines use it to understand what the image shows. If an image fails to load, the alt text displays in its place.
Good alt text rules:
- Describe what’s actually in the image, in about 125 characters or less
- Be specific: “golden retriever puppy playing in autumn leaves” beats “dog”
- Include your keyword only if it genuinely describes the image — never force it
- Skip “image of” or “picture of” — screen readers already announce it’s an image
- Leave alt text empty (alt=””) for purely decorative images like dividers and background patterns
Examples:
- Bad: “IMG_2938.jpg” / alt text: “photo”
- Okay: alt text: “chocolate cake”
- Good: alt text: “slice of chocolate layer cake with ganache on a white plate”
Write alt text like you’re describing the image to someone on the phone. That’s the right level of detail. Alt text is also one item on our on-page SEO checklist, which covers titles, headings, and internal links too.
What Makes a Good Image Filename?
The filename is a small signal, but it’s free and it takes five seconds. Before you upload an image, rename it from whatever your camera or phone called it.
- Bad: IMG_4829.jpg, DSC_0042.png, screenshot-2026-01-15.png
- Good: chocolate-chip-cookies-cooling-rack.jpg, denver-landscaping-before-after.png
Rules for filenames:
- Use lowercase letters
- Separate words with hyphens, not underscores or spaces
- Keep it short but descriptive — 3 to 6 words
- Include your keyword when it fits naturally
This is a tiny ranking factor on its own, but combined with good alt text and surrounding content, it helps Google build a clear picture of what the image — and the page — is about. And it makes your media library far easier to manage.
How Big Should Your Images Be (Dimensions)?
Uploading a 4000-pixel-wide photo to display at 800 pixels wide is one of the most common image mistakes. The browser still downloads the full 4000-pixel file, then shrinks it — wasting bandwidth and slowing your page for zero visual benefit.
Match your image dimensions to where they’ll actually display:
- Full-width hero images: 1600 to 2000 pixels wide is plenty
- Blog content images: match your content column — usually 800 to 1200 pixels wide
- Thumbnails and small images: 300 to 400 pixels wide
Check your theme or template to find your content width, then resize images to match before uploading. Most image editors and free tools like Squoosh let you resize and compress in one step. Never rely on HTML or CSS to shrink a huge image — the full file still downloads.
One more dimension tip: keep your aspect ratios consistent across similar images (all blog thumbnails 16:9, for example). It makes your site look more professional and avoids awkward cropping.
Should You Add Image Sitemaps or Structured Data?
For most blogs and small business sites, this is optional — but it’s worth knowing about.
An image sitemap is a file that lists your images so Google can find ones it might otherwise miss, like images loaded by JavaScript. If your images are in regular <img> tags in your HTML, Google finds them on its own and you don’t need a sitemap. Many SEO plugins can generate one automatically if you want the extra coverage. If you want to check sitemaps, schema, and crawl issues together, run through a technical SEO audit checklist.
Image structured data (schema markup) can make your images eligible for rich results, like badges in image search. Product images with markup can show price and availability right in results. This matters most for ecommerce sites. For a standard blog, good alt text and fast loading cover most of the value.
Don’t overthink this section. Nail the basics — compression, format, alt text, filenames, sizing — and you’ll have covered the fundamentals that matter most.
Frequently Asked Questions
Does Google really rank images separately?
Yes. Google Images is its own search engine with its own rankings. Images rank based on alt text, filenames, surrounding page content, page authority, and how well the image matches the query. Optimized images can bring steady traffic that your competitors are ignoring.
How many images should a blog post have?
There’s no fixed number, but aim for at least one image every 300 to 400 words to break up the text. A 1,500-word post with 4 to 5 relevant images reads much better than a wall of text. Every image should add something — don’t add filler just to hit a count.
Is WebP really better than JPEG?
For the web, yes. WebP delivers the same visual quality as JPEG at roughly a quarter to a third smaller file sizes, though actual savings vary widely by image and settings, which means faster loading. All modern browsers support it now. If any of your tools don’t handle WebP yet, a well-compressed JPEG is still perfectly fine.
Do background images need alt text?
No. Decorative images — backgrounds, dividers, purely visual flourishes — should have empty alt text (alt=””) so screen readers skip them. Only add descriptive alt text to images that carry meaning or information.
Can too many images hurt my SEO?
They can hurt your page speed, which hurts SEO indirectly. The images themselves aren’t the problem — uncompressed, oversized images are. A post with 10 well-optimized images will usually give readers a faster, better experience than a post with 3 unoptimized 2 MB photos. Optimize first, then use as many images as genuinely help the reader. If speed is a concern, an SEO audit checklist can help you find the heaviest pages.
Image optimization is one of those tasks that’s simple but easy to put off — and it quietly drags down your whole site’s speed in the meantime. For a wider foundation, our beginner’s roadmap to learning SEO puts image optimization in context. If you’d like a professional to handle it along with the rest of your on-page work, our digital marketing services cover full technical and content optimization.
