Website planning

Website Images: Size, Format, and Alt Text a Business Owner Should Know

Prepare website images with appropriate dimensions, compression, responsive sources, and useful alt text. Keep the main visible image loading promptly.

Wild Article 028, 2026-11-25: Website Images: Size, Format, and Alt Text a Business Owner Should Know

The short answer: photos slow pages when browsers download more image data than the layout needs. Resize and crop a photo for its display, compress it without hurting visible quality, and let smaller screens request smaller copies where your site supports that. Lazy-load only images below the first screen. Alt text should explain an image's useful content or function, not repeat search phrases.

Images are often among a page's heaviest resources. A camera original may have far more pixels than a card or banner displays, so the visitor downloads unnecessary data. web.dev explains how appropriate sizing and compression reduce image bytes. This guide covers image preparation, not every cause of a slow site.

1. Size the image for where it will appear

Start with the space the image will fill: thumbnail, content column, or banner. A 4,000-pixel camera original in a 500-pixel space is far larger than needed. There is no universal pixel target, though: a high-density screen may need a larger source for the same display width. web.dev explains how display size and screen pixel density affect image dimensions.

Ask, “What is the largest size and crop this image will actually use?” Keep the subject inside that crop, and avoid uploading the full camera original when a resized copy will do.

Have the site manager include width and height in the image markup. The browser uses them to reserve space and reduce layout shifts before the image loads. MDN explains these attributes.

2. Compress it, then inspect the result

Compression reduces file size. Lossy compression is common for photos but discards some image information; lossless compression does not. Try a setting, then inspect the photo at its display size. There is no universal setting, and over-compression can damage detail. web.dev recommends balancing file size against visual quality.

WebP and AVIF can often be smaller than JPEG or PNG. Whether your site can deliver them, and whether a fallback is needed, depends on its platform and setup. Google supports both formats and recommends that filenames match the actual file type in its image best practices.

For simple logos or icons, ask whether a vector file such as SVG is available. Whatever the format, keep the image clear enough for its purpose without unnecessary bytes.

3. Serve a useful size to each screen

A page can offer the same photo in several widths so the browser can choose one suited to the visitor's screen and layout. Developers use srcset to list image versions and sizes to describe how wide the image will appear. The browser can then request a smaller file instead of downloading one large image and shrinking it with CSS. web.dev explains these responsive image attributes.

Ask whoever configures the site: “Does it serve smaller image files on smaller screens?” If phone and desktop layouts use different crops, they may need separate image choices.

4. Lazy-load the images below the first screen, not the main image

Lazy loading defers downloads for images below the first screen, saving bandwidth for content the visitor can already see. Use it for nonessential, below-the-fold photos.

Do not lazy-load the hero or other main image visible when the page opens, especially if it is the Largest Contentful Paint (LCP) image, the largest image or text block visible during initial loading. Waiting for the browser to decide whether a lazy image is near the viewport can delay it. web.dev says to leave hero, above-the-fold, and likely LCP images eager. If a site setting lazy-loads every image, ask the site manager to exclude the main image. Keep width and height on lazy images so space is reserved before they appear, as MDN recommends.

5. Write alt text for the image's purpose

Alt text is a text alternative for people who cannot see an image or whose browser does not show it. The right text depends on the image's role in that particular page. The W3C WAI alt decision tree offers this quick guide:

  • Informative photo: briefly convey the relevant information. For a hypothetical HVAC company photo, “Technician replacing an air filter in a rooftop unit” is more useful than “photo of technician.” Include only details that matter in context.
  • Image link or button: describe the destination or action, not just the icon's appearance. For example, an image-only button might need “Search,” not “magnifying glass.”
  • Text inside an image: if the words are not shown elsewhere and matter to the user, include them in the alternative.
  • Purely decorative image, or one that repeats nearby text: use an empty alternative, written alt="", so a screen reader can skip it rather than announce redundant detail.
  • Chart, diagram, or other complex image: provide the key information in nearby text as well. A short alt value alone may not communicate all the data.

Alt text should not be a filename, a generic “image,” or a list of keywords. Google's image guidance says to make alt text useful and relevant to the page, and warns that keyword stuffing creates a poor user experience and may be treated as spam. Write what a person needs to know about the image in context, not every visual detail and not every service phrase you hope to rank for.

A quick image-prep checklist

Before an image goes live, ask:

  1. Is this the right crop and close to the largest size the layout needs?
  2. Has it been compressed, and does it still look good at its display size?
  3. Can the site serve a smaller source on smaller screens?
  4. Is lazy loading reserved for images below the first screen, not the main image?
  5. Does the alt text describe the image's purpose, or should it be empty because it is decorative or redundant?

Limits of this advice

Image preparation can reduce unnecessary image downloads, but it cannot by itself guarantee a faster site. Other page resources and technical issues may also matter. Do not sacrifice image clarity just to chase a smaller file, and do not treat alt text as a ranking trick or a substitute for accessible page design. Alt text is one part of accessibility, not a certification that a site has no barriers.

Evidence

Sources

  1. Image performance  |  web.devGoogle web.dev · Retrieved
  2. <img> HTML image embed element - HTMLMDN Web Docs · Retrieved
  3. Image SEO Best PracticesGoogle · Retrieved
  4. Lazy load images and <iframe> elements  |  web.devGoogle web.dev · Retrieved
  5. An alt Decision TreeW3C WAI · Retrieved

A useful next step

Keep a useful record

Use the ownership checklist to organize the accounts and people involved in your site.

Open the ownership checklist