All rules

Image alt text is a file name

image-file-name-alton by defaultJapanese / English

An image whose alt text is a file name, as in "![IMG_1234.png](…)"

Example

Flagged
Sales from April to June. ![IMG_2041.png](IMG_2041.png)
What chaff prints
3:1 The image alt text "IMG_2041.png" is a file name
Fixed
Sales from April to June. ![Sales from April to June](IMG_2041.png)
What chaff prints
no finding

How to fix

Write what the image shows in a few words ("![Sales by month, April](IMG_1234.png)").

Why it matters

An image whose alt text is its file's name ("![IMG_1234.png](IMG_1234.png)", "![Screenshot 2026-04-01](a.png)"). When the image does not load, or a screen reader reads the page, the alt text is all that stands in for it, and a file name says nothing about what it shows. It is usually the name a tool put in when the image was pasted. An empty alt text is image-alt-text's.

What it does not flag

Alt text that does not end in an image extension and does not start with a name a camera or screenshot tool gives ("![Architecture](diagram.png)") is not reported. The names are in the language's image-file-name lexicon. Images in quotations (>) and code are not read.

Turning it off or relaxing it

Silence this one spot (in the document)
<!-- stet: image-file-name-alt — reason -->
Relax it for the team (the reason is kept as a comment in chaff.yaml)
npx chaffjs relax image-file-name-alt --why "reason"
Turn it off for the team (chaff.yaml)
rules: image-file-name-alt: off
Technical details
Layer
L1
Status
stable
Severity
warning
Languages
Japanese and English
Suited to
business, technical, blog, legal, docs, academic, literature, speech
Reads from the document
markdown

Levels

Set a level for this rule under rules in chaff.yaml. With nothing set, it runs at the level its genre gives it (see By genre below).

stricterror
normalwarning
relaxedinfo

This rule has no limit to count to. A level sets how a finding is marked: relaxed keeps the finding and marks it a step lower.

By genre

Runs by default in
technical/spec, technical/readme, blog/tech, blog/essay, blog/owned-media, business/proposal, business/report, business/email, business/press-release, business/meeting-notes, legal/contract, legal/statute, legal/judgment, legal/patent, docs/manual, docs/faq, docs/glossary, academic/paper, literature/fiction, literature/essay, literature/poetry, literature/play, speech/address, speech/transcript

Genres

Message

The image alt text "{alt}" is a file name

Rewrite depth (chaff fix-plan --depth): light — words and sentences; the structure and the voice stay

This page is built from the rule's definition file:packages/chaff/rules/image-file-name-alt.yaml