There are a couple of reasons why it’s important to avoid broken links on a website:
1) Negative impact on your website’s ratings with major Search Engines like Google, Yahoo, Bing etc. Search engines will add demerits for broken links which can cause you to slip down in their placement.
2) Damage to your reputation online. Most online users sooner or later will get frustrated enough to never come back to the site.
Test your links.
Make sure your site works! Load your site in a browser and make sure all the images appear correctly, then click on all the links. You wouldn’t believe how may sites have broken images or internal links don’t work right? Who wants to visit a site like that. It screams unprofessional or, at the very least, careless.
If you link to any external sites, some of those links will almost certainly stop working at some point as the sites move or become extinct. Don’t waste your readers’ time by forcing them to follow broken links. Check your links at least once every few months. There are several free websites tools which will automatically check your links to external sites to see if any of them have gone dead.