How to Optimize Images for SEO
Filenames, alt text, structured markup and loading behaviour: what genuinely helps images get found and what does not.
Image optimisation for search has two halves: helping search engines understand what a picture shows, and making sure it does not slow the page down. Both matter, and the second is often ignored.
Descriptive filenames
IMG_4821.jpg tells a crawler nothing. copper-french-press-on-wooden-counter.jpg describes the content in words that could plausibly match a search. Use lowercase and hyphens, keep it short, and describe the picture rather than stuffing keywords into it.
Alt text written for people
Alt text exists so that someone using a screen reader receives the same information a sighted visitor gets. Write what the image actually shows and why it is there. If it is purely decorative, use an empty alt attribute so assistive technology skips it.
Search engines use alt text as a signal precisely because it is meant to be honest. Keyword-stuffed alt text reads badly to users and adds nothing.
Context around the image
Surrounding text, the nearest heading and the caption all help establish what a picture depicts. An image placed under a relevant heading and referenced in the body copy is far easier to interpret than one dropped into a gallery with no context.
Performance is part of it
- Serve modern formats such as WebP where you can.
- Add loading="lazy" to images below the fold, and never to the main hero image.
- Always set width and height so layout does not shift.
- Use srcset so phones do not download desktop-sized files.
- Compress to a sensible quality rather than shipping camera originals.
Structured data and sitemaps
For product, recipe and article pages, include the image URL in your structured data so search engines can associate it with the entity. If images are a significant part of your site, listing them in your sitemap helps discovery, especially for pages where images load through JavaScript.
Try the tools
Everything described in this article can be done here in your browser, free of charge and without uploading files to a server.
Keep reading
- Image Resolution vs Image Dimensions: What's the Difference?Why a 300 DPI tag means nothing on the web, and how pixel dimensions actually determine sharpness on screen and in print.
- How Large Images Affect Website PerformanceThe measurable cost of oversized images, from Largest Contentful Paint to mobile data use, and the fixes that move the needle.
- PNG vs WebP: Which Format Is Better?A direct comparison for graphics, screenshots and transparent images, including where PNG remains the safer choice.