Image optimization for SEO comes down to seven steps: scale the picture to at most twice its display width, convert it to a modern format such as WebP and compress it, give the file a descriptive hyphenated name, write meaningful alt text, declare width and height, never lazy-load the picture visible on first screen, and place it next to copy about the same subject. A search engine cannot look at a photograph and understand it. It reads the filename, the alt text, the sentences around it and how quickly the page became usable. The job is therefore two halves under one name: making the file technically light, and telling a machine what the picture is.
On the technical side, the image resizer and image compressor are the core pair, with JPG to WebP handling the container swap. On the meaning side, the slug generator produces clean filenames, the character counter keeps alt text within range, and the image cropper fixes framing. The image tools process files on the server and do not store them.
Why image optimization moves rankings
The effect arrives through two channels. The direct one: image search is its own traffic source, and appearing there depends heavily on the filename, the alt text and the content wrapped around the picture. The indirect one: heavy pictures stretch out how long a page takes to become usable and drag down Core Web Vitals, above all LCP, which measures when the largest element is painted. That damage applies to the whole page, not just the image.
The indirect channel usually matters more, precisely because it is not limited to one asset. Taking the four pictures on an article from 3 megabytes down to 400 kilobytes produces a measurable improvement without a single word of copy changing.
Filenames: the cheapest win available
The name a camera assigns communicates nothing. A lowercase, hyphenated name describing the contents informs both the crawler and whoever opens that folder six months from now.
- No spaces and no accented characters; URLs escape them and the result is unreadable. The slug generator converts accented letters to ASCII and turns spaces and punctuation into hyphens.
- Separate words with hyphens rather than underscores.
- Keep it to three to six words. Stacking keywords buys nothing and signals spam.
- When the same picture exists at several sizes, put the size at the end.
A good example: blue-backpack-side-view-1600.webp. Bad examples: DSC_0421.JPG, or best-backpack-cheap-backpack-backpack.jpg. The second bad example does more damage than the first: a meaningless name only misses an opportunity, while a stuffed one sends a negative signal.
Get the name right before publishing. Renaming a published image changes its address, and the links and image-search value that address had collected start again from zero. Choosing the right name up front is always cheaper than setting up redirects later.
Alt text: accessibility first, search second
The primary job of alt text is telling someone who cannot see the picture what is there. Do that job properly and the search side takes care of itself. Attempting the reverse, treating alt text as a keyword container, damages accessibility and can be read as spam.
| Situation | Alt text | Reason |
| Informative photograph | Short and descriptive | Conveys the content |
| Purely decorative image | Left empty (alt="") | Screen readers skip it |
| Image acting as a link | Names the destination | Makes the target clear |
| Chart or diagram | States the key finding | Moves the data into text |
| Image containing words | Repeats the words | Otherwise the text is lost |
A workable length limit is around 125 characters; some screen readers break longer text into chunks. Anything longer belongs in a caption or the body copy. The character counter treats accented letters and emoji as single characters, so it measures that limit correctly.
The most useful habit when writing alt text is imagining you are describing the picture to someone over the phone. You would never say “image of” or “photo of”; you would just say what it is. “Blue backpack seen from the side” is complete.
Size, format and loading priority
The technical side comes down to three decisions, each of which shows up directly in page speed.
The right dimensions and format
A picture that renders 800 pixels wide needs a 1600-pixel file to cover high-density screens; anything larger is waste. Entering only a width in the resizer keeps the aspect ratio and leaves the format unchanged, with a ceiling of 4000 pixels per edge. For photographs and general content WebP is a good default: according to Google's published comparisons, lossy WebP is typically 25–35% smaller than JPG at the same quality. The converter writes WebP at quality 90; if the file is still heavy, lower the quality in the compressor or give it a target size in KB.
HTML attributes that matter
A few attributes make a big difference when the picture goes into the page. width and height let the browser reserve space in advance, so the layout does not jump while loading. Adding loading="lazy" to pictures below the fold defers downloads nobody needs yet. The main picture on first screen gets the opposite treatment: no lazy loading, and where useful a fetchpriority="high" hint. To serve different sizes to different screens, use srcset and sizes and let the browser pick the right file.
Metadata and licensing
The compressor strips metadata, EXIF included. Most of the time that is welcome: personal details such as location disappear and the file loses a few kilobytes. If you want creator, credit or license details to appear in image search, though, supply them through structured data on the page or add them back after compression.
A ten-point pre-publish checklist
These ten points are the gate a picture passes before it ships. All of them take minutes.
- Dimensions. At most twice the display width.
- Format. WebP for photographs and general content; WebP or PNG when transparency is required, never JPG.
- Weight. Hero image under 150 kilobytes, total page imagery under 500.
- Filename. Lowercase, hyphenated, three to six descriptive words.
- Alt text. Descriptive, around 125 characters, no keyword stacking.
- Dimension attributes. Width and height declared.
- Lazy loading. Deferred for everything below the fold.
- Hero priority. The main first-screen picture is not deferred and is prioritised where needed.
- Context. The paragraph next to the picture is about the same subject.
- Licensing. Supplied through structured data where it matters.
Point nine is the one most often skipped. Crawlers infer a picture's subject largely from the copy surrounding it, so an image dropped into an unrelated section stays contextless no matter how clean its markup is.
The copy around the picture
The strongest signal of what a picture is about is often not its alt text but the paragraph directly above and below it. A product shot belongs in the section describing the product, a comparison chart beside the paragraph making the comparison. A short caption helps too; make it complement the alt text rather than repeat it.
Image optimization at the page level
Fixing individual files is not the whole job; the page has a budget too. A practical approach is to set an image budget per page type: one hero plus at most four in-body pictures for an article, one main shot plus six gallery images for a product page. When the budget is full, adding a picture means removing one.
The classic gallery mistake is serving full-size files as thumbnails. Putting a 1600-pixel file into a 120-pixel thumbnail slot is the largest single waste on such a page, and it hides well because everything looks correct. Generating real thumbnails cuts the total weight of a gallery page substantially. When square thumbnails are needed, the cropper is a quick route, since it crops from the center when no offset is given.
The measure-and-fix loop
An archive cleaned once degrades again within months, because new content keeps arriving. Durable results come from a small repeating loop rather than a one-off cleanup. Once a month, open your ten most visited pages and check total image weight, list the pages over your threshold, and work through the list at one page a week. Do not measure weight alone: missing alt text, duplicated filenames and images without dimension attributes belong on the same list. Finally, mark the pages you have finished, or you will reopen the same ones every round.
Frequently asked questions
Do keywords in filenames still help?
A descriptive name helps; a stuffed one does not. The difference is readability: if the name reads like a phrase when spoken aloud it is fine, and if it reads like a list it is harmful.
Can I reuse the same picture on several pages?
Yes. Even so, writing the alt text fresh for each page describes what the picture is doing on that particular page, which is the point of the attribute.
Do I need an image sitemap?
If your pages are crawled normally, most sites do not need one. It earns its place on layouts that load pictures through scripts, where a crawler cannot easily discover them.
Can lazy loading hurt?
Yes, when applied to the picture visible on first screen: the browser delays it and the largest element is painted later. Below the fold the benefit is clear. The rule is simple: never defer the hero, defer everything else.
Is text inside a hero image a problem?
Not in itself, but remember that the words exist only inside the picture. Repeat the same phrase in the page heading or the opening paragraph so the information does not disappear with the image.
To settle the format question, read how to choose an image format; to hit the weight targets, see image compression and web performance; and to fix a whole archive at once, follow the batch image conversion workflow. For the formats themselves, see what is WebP and what is AVIF, and for alt text and title lengths, the character limits guide.