While broken images on the website don't influence its search engine rankings directly, they definitely deserve being fixed for two reasons. First and foremost, broken images are a crucial factor for user experience and may result in visitors bouncing away from the site without completing their goals. And second, missing images may impede the site's crawling and indexation, wasting its crawl budget and making it hard for search engine bots to crawl some of the site's important content.
An image is considered broken if it returns a 4xx or 5xx status code, if the image URL is not specified in the tag, if its URL leads to a non-image content or if there's a DNS error detected. To fix the problem, make sure that the correct image URL is specified in the HTML code, and amend it if needed. Second, check if the image itself is still available on the server and restore it if possible. And finally, if there's no way to restore the broken image, simply replace it with another one or remove it from the content altogether.