Images work in SEO in three places at once: on the page they live on, in Google Images where they may appear and in the weight they cost your site. Deciding which of the three you care about is not optional if you want the work to be deliberate.
Optimizing an image is not applying filters or “painting” the keyword wherever it fits. It is a specific craft: choose the format, trim the weight, give correct dimensions, use a name that describes, an alt that can be read with ears —because a screen reader reads it— and a context that makes sense of it.
This guide walks through each decision, from the technical to the editorial, and ends with what cannot be achieved: the image helps explain, retain and lighten; it does not replace content or promise rankings. On choosing the text that surrounds all of this, there is this other guide on keywords.
01Quick summary
- Weight before beautyThe image seen on entry is the priority: if it does not load fast, the whole page seems slow and the metrics penalize the URL.
- Modern formats with criteriaWebP and AVIF allow less weight with comparable quality. They are served with a fallback for people arriving on an old browser.
- One image per devicesrcset and sizes give the phone what the phone needs and the monitor what the monitor needs, without two hand-made files.
- Name and alt describe, they do not stuffReadable files and honest alt text: what is in the image, not the catalog of services.
- Context and schemaThe image needs text around it and, if the page type justifies it, consistent structured data.
- Discoverability, not a guaranteeThe image sitemap and the regular sitemap help you get found in Google Images; they do not ensure you appear.
02What an image adds to SEO
The first contribution is to the reader: someone who finds a diagram of what is being explained understands faster and stays longer. The second channel is Google Images: a search for “mesh office chair” can start with images and end on your product page if the photo is well indexed and well explained.
The third contribution is the one almost nobody looks at: the weight. The main image of the homepage is usually the page’s LCP —the large element that is slow to paint—: if it does not load, the whole site feels slow and the experience metrics record it against the URL, not against the JPEG at fault. Optimizing the main image is optimizing performance.
And it is worth saying what an image does not add: unexplained brand presence, text put into a graphic because “it looks nicer”, a bar chart where the figures are not in the HTML. Google does not read pixels the way it reads paragraphs: what is not described in the text does not exist for the search engine. An image accompanies a page that already stands on its own; it never replaces it.
Cover all the images on your page and read it with text only. If it loses meaning, you depended on the image to explain; if it loses weight when downloading, you depended on them without knowing. Both are fixed by describing.
03Format, weight and dimensions
The format is not a matter of taste: it is the first weight decision. Each one has its territory and its limits.
| Format | When to use it | Limit |
|---|---|---|
| JPEG | Photography with universal compatibility | More weight than WebP/AVIF at equal quality |
| WebP | Today’s default for photos and web PNGs | Requires a fallback in very old browsers |
| AVIF | Photography where weight rules | Slower encoding; support is not universal |
| PNG | Screenshots and flat graphics with transparency | Extremely heavy for photography |
| SVG | Icons, logos and vector illustrations | Never for photography: it is a different territory |
Weight is attacked in order: first crop —a four-thousand-pixel photo going into an eight-hundred-pixel column is pure waste—, then compress with criteria and finally serve the modern format. Visual quality is defended by looking at the image, not at the slider number.
The LCP image
The first image visible without scrolling deserves different treatment from the rest: it is declared high priority, its space is reserved with width and height so the layout does not jump on load, and lazy-load is never applied to it: deferring what is seen on entry delays exactly what the metric measures. The rest of the images in the scroll are deferred.
srcset and distribution
With srcset and sizes the browser chooses the resolution appropriate to the device: the homepage on a phone does not need the file the design monitor sees. A CDN with image transformation solves this at catalog scale, serves modern formats by URL and takes work off the server and the theme. If the bottleneck is there —a theme that does not serve WebP, a server without caching—, the WordPress speed service starts from a measurement before touching anything.
04Name, alt, context and schema
The file name
“IMG_2043.jpg” says nothing to anyone. A file called “lawyer-consultation-murcia.jpg” describes what it contains to a person searching your folder and to a system that reads URLs. With hyphens, in lowercase and without piling up words: three or four terms that explain the photo, not the entire catalog of services.
The alt text
The alt describes what is in the image for someone who cannot see it: a screen reader reads it aloud before Google understands it as a signal. If the image informs —a diagram, a screenshot, a product photo—, the alt says what it informs. If it is decorative, the alt is empty: narrating a background texture is noise. What you do not do: stick there the keyword that did not fit in the text. Alt stuffing is the 2016 version still traveling in 2026; on writing for the person and the search engine at once, the keyword guide covers it.
The context
An image performs where the text surrounds it: a caption that explains, a mention in the paragraph, a section that gives it a reason to exist. A photo “floating” between one paragraph and another, unrelated to what is said, is weight and noise, not content.
Schema and image sitemap
When the page type justifies it —product, article, recipe—, structured data declares the images that belong: ImageObject, image in the schema of the type that applies, and og:image so the shared link displays well. Only mark what is true and what is on the page, on desktop and on mobile. The image sitemap or the image entries within the main sitemap help discover what is indexable; discovering is not ranking: it is each user’s query that decides whether you appear.
If structured data, the sitemap or the canonical break —the part where the image stops being aesthetics—, that is where technical SEO comes in.
05Common errors and limits
- Uploading the photo exactly as it comes out of the camera. Four thousand pixels where eight hundred are seen: the weight travels and the sharpness is not noticed.
- Lazy-load on the main image. Deferring what is seen on entry worsens exactly the LCP you wanted to protect.
- Alt with stuck-on keywords. Noise for someone using a screen reader and an empty signal for the search engine: the image does not carry the weight of the text.
- Text inside the image. Charts with figures, headlines in signs, menus in PNG: for the search engine and for accessibility, that text does not exist.
- Resizing a giant file with CSS. “Width: 100%” does not lower the bytes: the image arrives just as large on every device.
- Modern formats without a fallback. Serving only AVIF where the browser does not understand it leaves blank gaps: degrade with an alternative version.
- Buying “image SEO” by package. Nobody can commit to rankings for filling 400 alt fields: the quality of the whole decides.
The honest limit: optimizing images improves the experience, can contribute to page metrics and opens the door to Google Images; it does not raise rankings on its own, just as no section of a site raises them isolated from the rest. The image helps the page deserve to be where it is.
There are also no improvement figures to promise: whoever announces a percentage of traffic for filling alt fields is selling smoke. What does exist is measuring before and after on your own site, which is the only measurement worth deciding with.
06Frequently asked questions
Which format is “best” for image SEO?
There is no universal winner. WebP covers most cases today with less weight than JPEG; AVIF compresses more in photography at the cost of slow encoding; PNG is for flat graphics and transparency; SVG for vectors. The decision is made by image type and by compatibility, not by fashion.
Does alt count as a keyword?
It counts as a description, not as a fill field. An honest alt improves accessibility and gives context to the search engine; an alt with three keywords stuck to it loses on both counts. And the text of the image should be in the body of the page, not hidden in a graphic.
Do all images need alt?
No: decorative images have empty alt so that screen readers skip them. An invented alt on a background texture interrupts more than it informs. Describe what communicates content; leave silent what communicates nothing.
Does an image sitemap improve my rankings?
It helps discover indexable images and can shorten the wait until they appear in Google Images. It does not change relevance: if the image does not serve any query, discovery does not rank. It is part of technical SEO, not a promise of rankings.
How long does Google take to reindex my optimized images?
It does not depend on the optimization but on the crawling of your URLs: with an updated sitemap and correct internal links, days; with a badly crawled site, weeks. If you want to know why your site is not moving, the WordPress audit leaves the state documented and prioritized.