Guide

How to Optimise Images for SEO — Alt Text, File Size and Format

Images are one of the most overlooked elements of on-page SEO. Most businesses focus on text-based optimisation — keywords, headings, meta descriptions — while their images sit there unoptimised, slowing the page down and providing no ranking value whatsoever. Proper image optimisation addresses three distinct areas: the descriptive information you attach to images so search engines understand them, the file format you save them in, and the file size that determines how quickly they load. Getting all three right is more straightforward than it sounds.

Image optimisation matters for reasons beyond SEO. Page speed is a confirmed Google ranking factor, and large uncompressed images are the single most common cause of slow-loading pages. Accessibility is also at stake — alt text is read aloud by screen readers for visually impaired users, so writing good alt text is both an SEO and a legal best practice. The effort invested in optimising your images pays off across all three dimensions simultaneously.

Writing Effective Alt Text

Alt text — short for alternative text — is a written description of an image that is embedded in the HTML of your page. Search engines cannot see images the way humans do; they read the alt text to understand what an image depicts and to determine whether it is relevant to the surrounding content. Alt text also serves as the fallback text displayed if an image fails to load, and it is what screen readers convey to visually impaired visitors.

Good alt text is descriptive, concise, and naturally incorporates a relevant keyword where appropriate. If you sell hand-made leather bags and have a product photo, alt text like "handmade brown leather messenger bag" is appropriate. Avoid generic descriptions like "image1.jpg" or "photo," and avoid keyword stuffing like "leather bag leather bags buy leather bags UK" — this looks spammy to both search engines and screen readers. Aim for one to two sentences that describe the image as you would to someone who cannot see it.

Choosing the Right File Format

The format you save your images in has a significant impact on file size and quality. JPEG remains the standard for photographs and complex images with many colours — it achieves good quality at smaller file sizes than PNG. PNG is preferable for images with transparency, logos, icons, and graphics with flat colours and sharp edges, where its lossless compression preserves detail that JPEG would blur. WebP is a modern format supported by all major browsers that achieves smaller file sizes than either JPEG or PNG at equivalent quality — it is increasingly the recommended format for web images and is now the default export option in many image editors.

For vector graphics — logos, icons, and illustrations — SVG format is almost always the best choice. SVG files are resolution-independent (they scale perfectly to any size without pixelation), very small in file size, and can be styled with CSS. If your designer provides your logo as a PNG, ask for the SVG version — it will look sharper and load faster on every device.

Compressing Images Without Sacrificing Quality

The most important image optimisation step for most websites is compression — reducing file size before uploading. A high-resolution photograph from a modern camera can easily be 5 to 10 megabytes. The same image, optimised for web, should typically be between 50 and 200 kilobytes. Free tools such as Squoosh (squoosh.app), TinyPNG, and Photoshop’s "Export for Web" feature allow you to compress images while controlling the quality/size trade-off.

In addition to compression, resize images to the dimensions they will actually be displayed at before uploading. There is no benefit in uploading a 4,000-pixel-wide image if it will only ever be displayed at 800 pixels wide — the extra resolution is wasted and adds unnecessary file size. Many content management systems, including WordPress with appropriate plugins, can automate compression and resizing, but it is always better to start with properly sized source images.

FAQs

Common questions.

Does every image on my website need alt text?
Meaningful images — product photos, team photos, diagrams, infographics — should always have descriptive alt text. Purely decorative images that add no content value can use an empty alt attribute (alt="") to signal to screen readers that they should be skipped. In practice, if you are unsure whether an image is decorative or meaningful, write alt text for it — the benefit of the doubt is better than leaving it blank.
Should I include keywords in image file names?
Yes. Renaming your image files with descriptive, keyword-rich names before uploading is a minor but useful SEO practice. "leather-messenger-bag-brown.jpg" is better than "IMG_4782.jpg." Use hyphens to separate words rather than underscores or spaces, and keep the name descriptive but concise. This is a small signal, but combined with good alt text and contextual placement on the page, it contributes to overall image SEO.
How do I know if my images are slowing down my website?
Google PageSpeed Insights (pagespeed.web.dev) is a free tool that analyses any URL and identifies specific performance issues, including oversized images. It tells you exactly which images are too large and by how much, and provides estimated time savings from fixing them. Running your homepage and key landing pages through this tool is a good starting point for any image optimisation audit.
Related guides

More on web design & ux.

Want a hand putting this into practice?

Book a free, no-obligation consultation with a Norwich-based specialist.

Book a free consultation
Get started

Let's put your business in a better light.

Book a free, no-pressure consultation. We'll talk through your goals and tell you honestly what we'd do — whether you work with us or not.

  1. 01
    Tell us a bitFill in the form — two minutes, tops.
  2. 02
    We'll call you backWithin one working day, no pressure.
  3. 03
    Get a clear planHonest advice and a fixed quote.

Free · No obligation · We reply within one working day

Book a free consultation