Images help people understand a page. They can show a product, clarify a process, support a story, or make a website feel more complete. They also affect performance, accessibility, search visibility, and overall page quality.
Good image optimization is not about adding keywords to alt text. It is a combination of image format, file size, responsive delivery, accessibility, crawlability, and page experience. When these pieces work together, images become easier for people to use and easier for search engines to interpret.
Choose the Right Image Format
The image format should match the purpose of the image. Choosing the wrong format can make images unnecessarily large, blurry, or difficult to maintain.
- JPEG: A practical choice for photographs and images with many colors, gradients, or complex details.
- PNG: Useful for images that require transparency or crisp edges, though PNG files are often larger than needed for photos.
- WebP: A modern image format that often provides strong compression while preserving good visual quality. WebP is widely supported and is often a good default for website images. See WebP Images: Modern Image Formats for Website Optimization for more detail.
- AVIF: A newer format that can produce very small files with good quality. It can be useful, but testing browser support, visual quality, and workflow compatibility is still important.
- SVG: Best for logos, icons, and simple vector graphics. SVGs remain sharp at different sizes, but they should be sanitized and handled carefully for security.
- GIF: Usually best reserved for simple animations. For larger animations or video-like content, modern video formats are often more efficient.
There is no single best format for every image. The goal is to preserve the image’s purpose while reducing unnecessary file weight.
Resize Images Before Uploading
Separate the retained source from the resource delivered in the page. A useful original may be worth keeping for artwork, cropping, zooming, or downloads. The browser should receive an appropriately sized variant for the actual layout and display density rather than downloading that original for every placement.
If an oversized resource is actually downloaded, it still costs bandwidth even if CSS displays them smaller. This can slow down the page, especially on mobile connections.
For example:
- If a logo displays at 120 × 120 pixels, the site should not rely on a 2000 × 2000 pixel file for that placement.
- If a blog image displays at 800 pixels wide in the content column, uploading a 5000 pixel wide version may add unnecessary weight.
- If high-resolution displays are important, provide appropriately scaled versions rather than one oversized file for every device.
In WordPress, image size handling may be partly automated through generated thumbnail sizes. Keep a source large enough for its intended future uses, then verify that the generated variants and page markup deliver suitable files. A large retained original is not the same as a large download on every page view.
Compress Images Carefully
Image compression reduces file size. Smaller images generally load faster, which can improve user experience and support stronger performance signals.

Compression should be handled with care. Too little compression leaves the file heavier than necessary. Too much compression can create visible artifacts, blurry details, or poor-looking images.
Common approaches include:
- Using image optimization software before upload.
- Using a trusted WordPress image optimization plugin.
- Serving modern formats such as WebP or AVIF when appropriate.
- Testing important images visually after compression.
Compression is especially important for pages with many images, such as galleries, service pages, product pages, case studies, and long-form articles.
Use Descriptive Image Filenames
Image filenames should describe the image in plain language before the file is uploaded.
A filename like this is not very useful:
IMG_4827.jpg
A filename like this provides more context:
white-kitchen-cabinets-brass-hardware.jpg
Useful filenames can help with organization, accessibility workflows, and image search interpretation. They should be descriptive, concise, and readable.
Good filename practices:
- Use lowercase letters.
- Separate words with hyphens.
- Describe what is actually visible in the image.
- Avoid keyword stuffing.
- Avoid vague names such as
image1.jpg,photo-final-final.jpg, orhomepage-banner-new2.png.
Write Useful Alt Text
Alt text helps describe an image when the image cannot be seen. It is important for accessibility and can also help search engines understand image content.
Alt text should describe the image in context. It should not be treated as a place to force keywords.
Example:
<img src="white-kitchen-cabinets-brass-hardware.jpg" alt="White kitchen cabinets with brass hardware and a marble countertop">
This description can be useful when those visible features matter to the surrounding discussion. Choose the alternative according to what the image contributes in this context, rather than applying the same description everywhere it appears.
When to Use Empty Alt Text
Not every image needs descriptive alt text. Decorative images should often use an empty alt attribute so screen readers can skip them.
<img src="decorative-border.png" alt="">
An empty alt attribute is different from a missing alt attribute. Empty alt text tells assistive technology that the image is decorative. A missing alt attribute may create confusion.
Functional Images and Complex Diagrams
An image-only link or button needs an accessible name that communicates the destination or action. If a printer icon is the only content of a print button, an alternative such as “Print this article” communicates its function more usefully than “printer icon.” When adjacent text already provides the control’s name, the icon can often use empty alt text to avoid repetition.
A complex chart or diagram needs its important information available in text as well. Use a concise alternative to identify its purpose, then provide the relationships, values, or explanation in nearby prose, a table, or a clearly linked detailed description. Do not squeeze a whole diagram’s explanation into an excessively long alt attribute. The WAI alt decision tree helps distinguish informative, functional, redundant, decorative, and complex uses.
Alt Text Questions to Ask
- What information does this image provide?
- Would a user miss important meaning if the image did not load?
- Is the image decorative, informative, functional, or contextual?
- Does the alt text describe the image accurately?
- Is the alt text concise enough to be useful?
Accessibility and image optimization overlap here, but accessibility should come first. Choose the text alternative for the person’s task and the image’s role, rather than assuming every image calls for a visual description.
Use Responsive Images
Responsive images allow browsers to choose an appropriate image file based on screen size, display density, and layout needs. This helps avoid sending unnecessarily large images to small screens.
A basic responsive image example:
<img
src="kitchen-remodel-800.jpg"
srcset="kitchen-remodel-400.jpg 400w,
kitchen-remodel-800.jpg 800w,
kitchen-remodel-1200.jpg 1200w"
sizes="(max-width: 600px) 100vw, 800px"
alt="Kitchen remodel with white cabinets and a wood island">
The srcset attribute provides multiple image options. The sizes attribute describes the expected layout width for width-based candidates. In this example it declares a full viewport-width slot up to 600 pixels, and an 800 CSS-pixel slot otherwise. Those values must match the actual layout, including any narrower columns or margins; they are not universal settings to copy. The width descriptors must match the candidates’ actual intrinsic widths.
With a 600 CSS-pixel slot on a display with a pixel density of 2, a 1200-pixel-wide variant may be appropriate. That is a useful planning example, not a promise of which file the browser will choose. Test the actual request and rendered size in DevTools; viewport size, density, available candidates, caching, and browser policies can affect selection. See the HTML image reference.
WordPress often generates responsive image markup automatically when images are inserted through the media library. Even so, theme quality, image size settings, custom templates, and page builders can affect the final output.
Keep the Original Separate from Routine Delivery
The example below retains a 2400 × 1800 source and offers smaller variants with the same aspect ratio. A small display might use a 400-pixel-wide candidate; a larger, denser display might use a 1600-pixel-wide candidate. A full-size link can make the retained source available for close inspection without requiring every visitor to download it as the inline image. Avoid scripts or preloads that fetch that larger file unnecessarily.

Define Image Width and Height
Images should include width and height attributes, or otherwise reserve the correct layout space. This helps browsers understand the image’s aspect ratio before the file fully loads.
<img
src="bathroom-vanity.jpg"
width="800"
height="533"
alt="Bathroom vanity with two sinks and wall-mounted mirrors">
Defining image dimensions helps reduce layout shifts. Layout shift is part of page experience and can affect how stable a page feels while loading. This connects directly to Core Web Vitals, especially Cumulative Layout Shift.
Images can still be responsive while using width and height attributes. Modern browsers use those attributes to calculate aspect ratio, while CSS can control how the image scales visually.
Lazy Load Non-Critical Images
Lazy loading delays offscreen images until they are closer to being viewed. This can improve initial load performance, especially on long pages.
Native lazy loading can be added with the loading attribute:
<img
src="deck-renovation.jpg"
loading="lazy"
alt="Renovated backyard deck with wood railing">
Lazy loading is useful for images below the first visible screen. It should be used carefully for images that are immediately visible when the page loads.
In general:
- Use lazy loading for below-the-fold content images.
- Do not lazy-load the image that is the Largest Contentful Paint element; allow it to be discovered and requested promptly.
- Test pages after enabling lazy loading, especially if a theme or plugin adds its own lazy loading behavior.
Prioritize Important Images
Some images are more important to the initial loading experience than others. A hero image, product image, or primary article image may be a major visual element near the top of the page.
For important above-the-fold images, consider whether the image should be loaded earlier rather than delayed.
Modern HTML supports fetchpriority:
<img
src="home-exterior-remodel.jpg"
width="1200"
height="675"
fetchpriority="high"
alt="Updated home exterior with new siding and front entry">
This is a browser priority hint, not a guarantee of request order or a substitute for early resource discovery. Use it selectively for a likely LCP image rather than marking every image high priority. Check the actual LCP element, request timing, and resource priority in DevTools, and compare performance after the change. See the LCP optimization guidance.
Make Images Crawlable and Indexable
Search engines need access to image files in order to crawl and index them. If image URLs are blocked, broken, redirected poorly, or loaded in a way that search engines cannot process, image visibility may be limited.
Check that:
- Important image URLs return a successful status code.
- Images are not blocked by robots.txt.
- Images are not hidden behind authentication.
- CDN image URLs are accessible.
- Redirects are intentional and not excessive.
- Canonical page structure reflects substantially equivalent page content, not simply reuse of an image. Sharing an image does not make two otherwise distinct pages duplicates.
Use standard HTML image markup with a discoverable src, including a fallback when using srcset or picture. Google documents that it discovers images in HTML image elements but does not index CSS background images. CSS backgrounds can still suit decoration; important content images need appropriate markup and text alternatives. See Google’s image discovery guidance.
Image crawlability is part of broader technical SEO. It connects with URL structure, internal linking, sitemaps, performance, and indexability. For related technical cleanup, see web standards and quality assurance.
Use Image Sitemaps When Helpful
Image sitemaps can help search engines discover important images, especially when images are loaded through JavaScript, galleries, or complex templates.
Many websites include image information within their XML sitemap automatically. WordPress SEO plugins may handle this depending on configuration.
Image sitemap inclusion can be useful for:
- Large media libraries.
- Product images.
- Portfolio galleries.
- Recipe images.
- News or editorial images.
- Visual documentation or instructional content.
Support Images With Surrounding Context
Search engines do not interpret images from alt text alone. The surrounding content also matters.
An image is easier to understand when the page provides clear context through:
- Nearby headings.
- Relevant body copy.
- Captions when helpful.
- Structured page organization.
- Descriptive filenames.
- Relevant internal links.
For example, an image of a finished kitchen remodel is more meaningful when it appears in a section about cabinet layout, countertop materials, or lighting design than when it is placed without context.
Captions are not required for every image, but they can be useful when the image adds evidence, explanation, location, attribution, or detail that supports the page.
Serve Images Efficiently
Image delivery affects how quickly a page becomes usable. Efficient delivery often involves more than compression alone.
Consider these delivery factors:
- Browser caching: Image files that do not change often can usually be cached for longer periods.
- CDN usage: A content delivery network can serve images from locations closer to users.
- Modern formats: Serving WebP or AVIF where supported can reduce bandwidth.
- Correct MIME types: Image files should be served with appropriate content types.
- HTTPS: Images should be delivered securely to avoid mixed-content issues.
- Clean redirects: Image files should not pass through unnecessary redirect chains.
A CDN can be helpful, but it should be configured carefully. Poor caching rules, broken transformations, or inconsistent URLs can create problems. The goal is stable delivery, not complexity for its own sake.
Image SEO Checklist
Use this checklist when reviewing images on a website:
- Images use an appropriate file format.
- Delivered image dimensions suit layout width and display density, while useful originals are retained separately.
- Files are compressed without unacceptable quality loss.
- Filenames are descriptive and readable.
- Informative images have useful alt text.
- Decorative images use empty alt attributes.
- Responsive image markup is present where needed.
- Width and height attributes are included or layout space is reserved.
- Below-the-fold images are lazy loaded.
- Important above-the-fold images are not delayed unnecessarily.
- Image URLs are crawlable and return successful status codes.
- Important images are included in XML sitemaps when appropriate.
- Images are supported by relevant surrounding content.
- CDN and caching behavior are working correctly.
- Pages are tested for performance and layout stability.
Image SEO FAQ
Does alt text help SEO?
Alt text can help search engines understand image content, but its first purpose is accessibility. The best alt text describes the image clearly and accurately in the context of the page.
Should every image have alt text?
For ordinary HTML img elements, provide an appropriate alt attribute, but not every image needs a visual description. Informative images need their meaning conveyed; image-only controls need their action or destination conveyed; complex diagrams need a fuller text equivalent. Decorative or redundant images should usually use an empty attribute: alt="". CSS backgrounds have no alt attribute and should not carry otherwise unavailable essential information.
Is WebP better than JPEG or PNG?
WebP is often more efficient than JPEG or PNG, but the best format depends on the image and the website’s needs. Photographs, transparent graphics, icons, and illustrations may each call for a different approach.
Can large images hurt rankings?
Large image files can slow down pages, and slow pages can create a poor user experience. Performance is one part of technical SEO and page quality. The practical goal is to make images as light as possible while keeping them visually useful.
Should hero images be lazy loaded?
Usually no. If the hero image is visible immediately when the page loads, lazy loading may delay an important visual element. Lazy loading is generally better for images farther down the page.
The Sum
Image SEO works best when it is treated as part of the whole page. A useful image should be clear to people, accessible to assistive technology, efficient for browsers, and understandable to search engines.
The strongest approach is steady and practical: choose the right format, resize the file, compress it well, write accurate alt text, preserve layout stability, and make important image assets easy to crawl. These habits support better performance, better accessibility, and a more reliable website over time.
Graphic art by Mary Hall