How to Optimize Image Alt Text and File Sizes for Faster Loading & SEO
Learn how to write image alt text that helps Google and users, and how to shrink image file sizes for faster pages. This 2026 guide covers formats, compression, lazy loading, and a simple step-by-step workflow.
Image alt text and file size are two of the quickest SEO wins on any website. To optimize them, write short, descriptive alt text for every meaningful image and compress each file to roughly 100–200 KB or less. Use modern formats like WebP or AVIF, resize images to their display size, and lazy-load anything below the fold. These steps cut load time, improve Core Web Vitals, and help Google understand and rank your images.
Most sites get this wrong in the same ways. They upload 4 MB phone photos straight into the CMS. They leave alt fields blank or stuff them with keywords. The result is slow pages, poor accessibility, and lost traffic from Google Images.
This guide shows you how to fix both problems. You will get clear rules, real examples, a format comparison, and a repeatable workflow for every page you publish.
Why Image Alt Text and File Size Matter for SEO
Images make pages easier to scan and explain ideas fast. But search engines cannot "see" a photo the way people do. They rely on text signals, and they measure how fast your page loads. Alt text handles the first job. File size controls the second.
Alt Text Gives Images Context
Alt text (the alt attribute) describes an image in words. Screen readers read it aloud to users with visual impairments. Browsers show it when an image fails to load. Search engines use it, along with nearby text and the file name, to understand the image.
Google says this directly in its Google Search Central image SEO best practices. Descriptive alt text helps images appear in Google Images and supports the main topic of the page.
File Size Drives Page Speed
Images are usually the heaviest part of a web page. On many sites, the hero image is also the Largest Contentful Paint (LCP) element. If that one file weighs 2 MB, your LCP score drops, and so does the user experience.
Google's Core Web Vitals reward pages that show their main content within 2.5 seconds. Heavy images make that target very hard to reach, especially on mobile data.
The Business Impact
Slow, unlabeled images cost you in three ways:
- Lower rankings from weak page experience signals
- Higher bounce rates when visitors leave before the page loads
- Missed traffic from image search and AI-powered results that read alt text
How to Write Image Alt Text That Helps SEO
Good alt text is short, specific, and written for people first. Think of it as describing the image to a friend over the phone. These are the rules we follow on client projects.
7 Rules for Effective Alt Text
- Describe what is in the image. Mention the subject, the action, and one key detail.
- Keep it under about 125 characters. Many screen readers cut off longer text.
- Use the focus keyword only when it fits. Once or twice per page is plenty.
- Skip "image of" or "picture of." Screen readers already announce it as an image.
- Add useful context. A product photo should include brand, model, or color.
- Use empty alt (
alt="") for decorative images. Dividers and background shapes only add noise. - Summarize charts and infographics. State the main takeaway, not every data point.
Good vs Bad Alt Text Examples
Here is how the same product photo can be described:
- Missing:
alt=""on a product photo, which hides it from search - Keyword stuffed: "running shoes cheap running shoes best running shoes sale"
- Too vague: "shoes"
- Good: "Blue Nike Pegasus 41 running shoe, side view on white background"
The good version is specific, natural, and helpful. It also matches what a shopper might type into Google Images.
Common Alt Text Mistakes to Avoid
- Copying the page title into every alt attribute
- Leaving CMS defaults like "IMG_4382" or "screenshot-final-2"
- Writing the same alt text for every image in a gallery
- Placing key text inside images with no text alternative
- Forgetting alt text on linked images, where it acts as the link anchor
How to Reduce Image File Sizes Without Losing Quality
Alt text helps Google understand your images. Smaller files help Google and your visitors load them fast. The goal is the lowest file size that still looks sharp on screen.
Pick the Right Image Format
Format choice alone can cut file size by half. Use this table as a quick guide:
| Format | Best For | Compression | Transparency | Typical Size vs JPEG |
|---|---|---|---|---|
| JPEG | Photos, complex images | Lossy | No | Baseline |
| PNG | Logos, screenshots, sharp edges | Lossless | Yes | Often 2–5x larger |
| WebP | Most photos and web graphics | Lossy and lossless | Yes | About 25–35% smaller |
| AVIF | High-quality photos at tiny sizes | Lossy and lossless | Yes | Often 40–50% smaller |
| SVG | Icons, simple logos, illustrations | Vector (code) | Yes | Tiny for simple shapes |
In 2026, every major browser supports WebP, and AVIF support is close to universal. For most sites, WebP is the safe default. Use AVIF when you want the smallest files and your CMS or CDN handles it.
Resize Images to Their Display Size
A modern phone camera shoots images 4,000 pixels wide or more. Your blog content area might only show 800 pixels. Uploading the full image forces every visitor to download pixels they never see.
Use these width targets as a starting point:
- Full-width hero images: 1,600–2,000 px
- Blog content images: 800–1,200 px
- Thumbnails and cards: 300–600 px
- Retina screens: serve 2x versions through
srcset, not one giant file
Compress Every Image Before Upload
Compression removes data the eye barely notices. A quality setting of 70–80% for lossy formats usually looks the same as the original. It can still shrink the file by 60–80%.
Run a quick pass with a free online image compressor before you upload. Aim for under 200 KB for large hero images and under 100 KB for standard content images.
Use Descriptive File Names
File names are a small but real ranking signal. Rename files before upload:
- Bad:
DSC_0091.jpg - Good:
blue-running-shoe-side-view.webp
Use lowercase letters, hyphens between words, and a short, honest description.
Technical Settings That Make Images Load Faster
Format and compression fix the file itself. These HTML and server settings control how the browser loads it.
Lazy-Load Below-the-Fold Images
Add loading="lazy" to images lower on the page. The browser waits until the user scrolls near them. This cuts the initial page weight and speeds up the first view.
Never lazy-load your hero or LCP image. That delays the most important element on the page.
Prioritize the LCP Image
Add fetchpriority="high" to the main above-the-fold image. This tells the browser to download it first. On many pages, this one attribute trims LCP by a few hundred milliseconds.
Set Width and Height Attributes
Always include width and height on image tags. The browser then reserves the right space before the image arrives. This prevents layout jumps and protects your Cumulative Layout Shift (CLS) score.
Serve Responsive Images
Use srcset and sizes so phones get small files and desktops get larger ones. Frameworks like Next.js and most modern WordPress themes create these versions automatically.
Use a CDN and Caching
A content delivery network serves images from servers close to each visitor. Many CDNs also convert images to WebP or AVIF on the fly. Pair this with long cache headers so repeat visitors load images instantly.
Pro Tip: Find your LCP element in PageSpeed Insights before you optimize anything else. Fixing that single image often gives a bigger speed gain than compressing fifty images further down the page.
A Step-by-Step Image Optimization Workflow
Use this checklist every time you publish. It takes a few minutes per page and prevents most image problems.
- Choose the image. Original photos and graphics stand out more than generic stock.
- Crop to the right ratio. Match the layout slot, such as 16:9 for covers or 1:1 for cards.
- Resize to display width. Use the size targets listed above.
- Convert to a modern format. A free image converter for WebP and PNG files makes this quick.
- Compress at 70–80% quality. Compare before and after at 100% zoom.
- Rename the file. Use short, hyphenated, descriptive words.
- Write the alt text. Describe the image clearly and add the keyword only if natural.
- Add HTML attributes. Set width, height, and lazy loading or fetchpriority.
- Test the page. Run PageSpeed Insights and confirm no image warnings remain.
How to Audit Images on an Existing Website
New pages are easy to get right. Older pages often hide hundreds of heavy or unlabeled images. Here is how to find and fix them.
Tools to Find Image Issues
- PageSpeed Insights and Lighthouse: flag oversized images, missing dimensions, and old formats
- Google Search Console: shows Core Web Vitals issues by page group
- Site crawlers like Screaming Frog: list every image missing alt text or over a size limit
- Browser DevTools: the Network tab shows the real download size of each image
Prioritize by Impact
Do not try to fix everything at once. Work in this order:
- Pages with the most organic traffic
- Templates used across many pages, such as product or blog layouts
- Hero images that act as the LCP element
- Any image over 500 KB, anywhere on the site
Here is a typical scenario. An online store has product images averaging 1.2 MB each. Resizing them to 1,200 px and converting to WebP often brings them under 150 KB. That kind of drop can move mobile LCP from "poor" to "good" without any design change.
Keep the Problem From Coming Back
Add image rules to your content guidelines. Make alt text a required field in your CMS. Turn on automatic compression at upload. These small process changes stop heavy, unlabeled images from creeping back in.
Faster Pages and Better Rankings Start With Your Images
Image optimization is one of the few SEO tasks that improves speed, accessibility, and rankings at the same time. Write clear alt text for every meaningful image. Keep files small with the right format, size, and compression. Then use lazy loading, fetchpriority, and fixed dimensions so pages load smoothly.
Start with your highest-traffic pages and your LCP images. You will often see the gains in Core Web Vitals reports within a few weeks. If you want experts to audit and fix image, speed, and crawl issues across your whole site, our technical SEO services team can handle it for you.
Frequently asked questions
Keep image alt text under about 125 characters, which is usually 5 to 15 words. Many screen readers cut off longer text, and short descriptions are easier for search engines to understand. Focus on the subject, action, and one key detail, and include your keyword only when it fits naturally.
Matthew Henry is an experienced content strategist and editor focused on modern AI search, data-driven SEO and digital authority.
