# jsx-a11y-x/img-redundant-alt
📝 Enforce `
` alt prop does not contain the word "image", "picture", or "photo".
💼 This rule is enabled in the following configs: ☑️ `recommended`, 🔒 `strict`.
Enforce img alt attribute does not contain the word image, picture, or photo. Screen readers already announce `img` elements as an image. There is no need to use words such as _image_, _photo_, and/or _picture_.
## Rule options
This rule takes one optional object argument of type object:
```json
{
"rules": {
"jsx-a11y/img-redundant-alt": [
2,
{
"components": ["Image"],
"words": ["Bild", "Foto"]
}
]
}
}
```
For the `components` option, these strings determine which JSX elements (**always including** `
`) should be checked for having redundant words in the `alt` prop value . This is a good use case when you have a wrapper component that simply renders an `img` element (like in React).
For the `words` option, these strings can be used to specify custom words that should be checked for in the alt prop, including `image`, `photo`, and `picture`. Useful for specifying words in other languages.
The rule will first check if `aria-hidden` is true to determine whether to enforce the rule. If the image is hidden, then rule will always succeed.
### Succeed
```jsx
// Will pass because it is hidden.
// This is valid since photo is a variable name.
```
### Fail
```jsx
```
## Accessibility guidelines
General best practice (reference resources)
### Resources
- [WebAIM, Alternative Text](https://webaim.org/techniques/alttext/)