In most cases the alt attribute should be empty.
<img src="image.png" alt="">
There are two exceptions.
- The image is a link
- Without the image the content would be incomplete
The first exception is easy. If an image is a link there must be an alt text and that text should describe the link, not the image (just like good link text).
The second one is easy too. If the content on the page can’t be understood without the image the image must have an alt text that describes what’s on this image. The alt-text should be a logical addition to the rest of the content. If you replace the image with the alt text it should still make sense. If it doesn’t rewrite it or remove it.
Please see the WHATWG for a more detailed and complete explanation of the art of good alt text