The bogus-image-options error is when an image is detected to use a non-existent option. For example in the code
foo" and "
bar" are bogus options, and "
baz" shows up as the caption.
Help:Images has details on the supported image options, including a few notes about the quirky behavior of some of the parameters.
Known bugs in the Linter bogus file options detection:
- task T215999 - Linter does not detect invalid "500px500px" or "left500px" as a bogus file option
- task T216003 - Linter fails to detect multiple "upright" parameters as a bogus file option (in some cases)
- task T264464 - Conflicting border/thumb/frame options are not detected as Linter errors
- task T216566 - Capitalized versions of valid File options are usually ignored, but are not flagged as Linter bogus file options
- task T179605 - LintError bogus-image-options triggers on "Thumbtime"
In addition some other supported file options such as video and multi-page formats (e.g. pdf) are also checked.
Common errors include:
- Repeated options, e.g.
- Conflicting alignment options, e.g.
- Conflicting border/frame/thumb options (not reported as a Linter error; see phab link above), e.g.
[[File:Example.jpg|thumb|right|150px]](always remove the "border" option)
- Blank options, e.g.
- Two captions, e.g.
[[File:Example.jpg|thumb|right|Intended alt text|Caption text]]→
[[File:Example.jpg|thumb|right|alt=Intended alt text|Caption text]]
- A plain number instead of a px value, e.g.
- Typos in options, e.g.
- Use of
<gallery>...</gallery>tags. To fix, remove
The following tools can help fix bogus image options:
- WPCleaner: see instructions on how to use WPCleaner for fixing errors detected by Linter. Bogus image options may be reported by WPCleaner as part of CheckWiki error #534.