↑ ↓ select, Enter open, Esc close

Find images without an alt attribute on a page

Adjust the values, the command updates live
user@server
curl -s https://example.com/ | tr '\n' ' ' | grep -oiE '<img[^>]*>' | grep -viE '\balt='

Prints every <img> element that has no alt attribute at all. Alt texts help screen readers and give search engines context for image search. No output means all images have an alt attribute.

Note: An empty alt="" is correct for purely decorative images and is not reported here. curl does not see images loaded via JavaScript.

Also searched as

  • find images missing alt text
  • check img alt attributes command line
  • images without alt tag
  • accessibility check images

Related one-liners

All in SEO checks

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.