<img src="non-existant.jpg" alt="Some alt text." />
img[alt]:not([alt=""])::before {
  content: 'Image (' attr(src) ') failed to load: ';
  color: red;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.