Home›Academy›On-Page SEO›Images

On-Page SEO · Lesson 05 · Media

Images

How images contribute to page understanding, accessibility, and performance, from alt text and descriptive filenames to width and height attributes, surrounding content, and screen reader support.

05 On-Page SEO9 min Read timeBeginner Level

05 / Media

Images are part of a page's content, not just visual decoration. Proper filenames, useful alt text, defined dimensions, and relevant surrounding content help browsers, users, screen readers, and search engines understand how an image fits into the page.

Where internal links connect pages to each other, image attributes connect each visual to the topic of the page it sits on. A well optimized image answers one simple question:

The core question

What information does this image add to the page?

This lesson covers the alt attribute, image filenames, width and height, surrounding content, and accessibility. It also explains how to use SiteAuditLint to find missing alt text, generic filenames, and images without defined dimensions.

1. Alt text

Describe the image's purpose

Alt text provides a text alternative for an image when the image cannot be seen or loaded. Screen readers read the alt text aloud to users, while search engines can use it as additional context about the image and the surrounding page, including for image search.

Good alt text describes the meaningful subject or function of the image rather than stuffing keywords into the attribute:

<img src="technical-seo-audit.png"
     alt="Technical SEO audit showing broken links and missing page titles">

Avoid descriptions that add no useful information:

<img src="image123.jpg" alt="SEO SEO audit SEO tool">

For decorative images that provide no meaningful information, an empty alt attribute tells assistive technology to skip the image:

<img src="divider.svg" alt="">
VersionAlt textWhat it communicates
MissingNo alt attributeScreen readers may announce the filename instead
Keyword stuffedSEO SEO audit SEO toolRepetition with no description of the image
DescriptiveTechnical SEO audit showing broken links and missing page titlesThe actual subject of the image
Decorativealt=""The image is intentionally ignored

Check for

  • Missing alt attributes.
  • Empty alt text on meaningful images.
  • Uninformative descriptions.
  • Keyword-stuffed alt text.
  • Alt text that does not match the image.
  • Decorative images that should have empty alt text.
SiteAuditLint check

Review image URLs and their alt attributes together. A useful audit distinguishes between images that need descriptive text and genuinely decorative elements.

2. Image filenames

Give images meaningful names

The filename can provide additional context about an image before the image itself is interpreted. Compare a camera-generated name with a descriptive one:

Generic vs descriptive filenames

GenericIMG_4827.jpgSays nothing about what the image shows.
Messyseo-best-image-final-final2.pngWorkflow leftovers, not a description.
Descriptivetechnical-seo-crawl-report.jpgIdentifies the subject at a glance.

Use lowercase words separated by hyphens that describe the actual image, such as broken-link-report.png.

A descriptive filename makes the image easier to identify in content management systems, media libraries, downloads, and audits.

Check for

  • Generic filenames.
  • Camera-generated filenames.
  • Excessive numbers or random characters.
  • Filenames unrelated to the image.
  • Excessively long filenames.
Filenames support, alt text describes

Descriptive filenames improve content organization and provide useful context, but they are not a replacement for good alt text.

3. Width and height

Define image dimensions

Images without defined dimensions can cause the browser to adjust the layout as images load, pushing text and buttons down the page. This movement is measured as layout shift. Providing width and height lets the browser reserve the right amount of space before the image file arrives:

<img src="seo-audit.png"
     alt="SEO audit report"
     width="1200"
     height="675">

The dimensions should represent the image's intrinsic proportions. An image that is 1200 by 675 pixels has a 16:9 aspect ratio and should keep that ratio when displayed. CSS then controls the final, responsive presentation:

img {
  max-width: 100%;
  height: auto;
}

Check for

  • Missing width attributes.
  • Missing height attributes.
  • Incorrect aspect ratios.
  • Images that are unnecessarily large in file size or pixel dimensions.
  • Images that create layout shifts.

Dimensions are primarily a technical and user experience consideration, but they belong in an on-page audit because poorly handled images affect how a page loads and behaves.

4. Surrounding content

Give images context

An image rarely exists in isolation. Headings, paragraphs, captions, links, and nearby content explain what the image represents and why it matters:

<h2>Find broken internal links</h2>

<p>
  Review broken URLs and the pages linking to them before making changes.
</p>

<img src="broken-links-report.png"
     alt="Broken internal links displayed in an SEO audit report"
     width="1200"
     height="675">

The heading and paragraph establish the topic, while the alt text describes the image itself. Each layer does its own job.

Layers of image context

L1TopicHeading
L2ExplanationParagraph or caption
L3DescriptionAlt text
L4IdentifierFilename

Avoid relying on an image to communicate information users cannot access elsewhere when that information is important to understanding the page, such as prices, instructions, or data embedded as text inside a graphic.

Check for

  • Images placed near relevant content.
  • Useful captions where appropriate.
  • Images that support the page topic.
  • Important information hidden only inside images.
  • A mismatch between image content and surrounding text.
SiteAuditLint check

When reviewing image issues, consider the page context rather than treating every image as an isolated element.

5. Accessibility

Make images usable for everyone

Image optimization is also an accessibility task. Users may browse with screen readers, disable images, use slow connections, or interact with pages in ways that differ from the site's visual design.

Does the image convey meaningful information?

Decide first whether the image is informative, functional, or purely decorative.

Is there an appropriate text alternative?

Meaningful images need alt text that communicates the same information.

Are decorative images excluded from screen reader output?

An empty alt="" prevents unnecessary announcements.

Do image dimensions preserve the layout?

Defined width and height keep content stable while images load.

Is important text embedded inside images?

Text in images cannot be selected, translated, or resized, and may be lost entirely.

Accessibility should guide the implementation, rather than treating alt text simply as an SEO field.

6. Image optimization checklist

Before publishing a page, check each meaningful image.

Image checklist

0 of 10 tasks completed

7. SiteAuditLint workflow

An image audit should not stop at finding images without alt text. Review the relationship between the image, its HTML attributes, and the content surrounding it.

Image audit loop

01Crawl the websiteCollect images and their page data.
02Find missing alt textFlag images lacking an alt attribute.
03Review filenamesSpot generic or auto-generated names.
04Check dimensionsFind images without width and height.
05Review page contextConfirm images support the content.
06Fix and recrawlCompare results with the previous audit.

After making changes, run another crawl to confirm alt text, filenames, and dimensions are resolved across the site.

8. Before and after example

Consider an image showing a broken link report:

<img src="IMG_4827.jpg"
     alt="SEO report"
     width="1200"
     height="675">

The dimensions are fine, but the filename is camera-generated and the alt text is vague. A more descriptive implementation would be:

<img src="broken-internal-links-report.png"
     alt="Broken internal links displayed in an SEO audit report"
     width="1200"
     height="675">
AttributeBeforeAfter
FilenameIMG_4827.jpgbroken-internal-links-report.png
Alt textSEO reportBroken internal links displayed in an SEO audit report
Dimensions1200 by 6751200 by 675
Alt text is not a content replacement

The surrounding heading and paragraph should still explain the broader topic. Alt text should describe the image, not attempt to replace the page's content.

9. Practical exercise: Audit five images

Choose five images from a website you manage and record what you find for each one.

ImageAlt textFilenameWidth/HeightContext
Image 1Present / MissingDescriptive / GenericDefined / MissingRelevant / Review
Image 2Present / MissingDescriptive / GenericDefined / MissingRelevant / Review
Image 3Present / MissingDescriptive / GenericDefined / MissingRelevant / Review
Image 4Present / MissingDescriptive / GenericDefined / MissingRelevant / Review
Image 5Present / MissingDescriptive / GenericDefined / MissingRelevant / Review

The goal is not to give every image more text. The goal is to make every meaningful image understandable, accessible, and properly connected to the page content.

10. Key takeaways

  • Alt text provides an accessible text alternative for meaningful images.
  • Image filenames should describe the image rather than use meaningless generated names.
  • Width and height help browsers reserve space and reduce layout movement.
  • Surrounding content gives images additional meaning and context.
  • Accessibility should be part of image optimization from the beginning.
  • Image SEO is contextual. A descriptive filename or alt attribute cannot compensate for irrelevant or poorly placed content.

Knowledge check

1. What is the main purpose of alt text?
2. How should a purely decorative divider image be marked up?
3. Why define width and height on an image?
4. Which filename is most useful?

Ready to go further? Review the technical SEO checklist, or revisit how pages connect in the Internal links lesson.