Avoid Empty src or href
What Does src and href Mean?
What is the Impact of an Empty src or href?
Where this really matters depends on which browser, and specifically which browser version, your users are coming in from. Some browsers, like Opera, handle this without issue, however, late versions of Internet Explorer, and now Edge, will make a request to the directory where the page is located. The Chrome and Safari browsers are different. These browsers make a request to the page itself. Early versions of Firefox also did this, but it has been subsequently fixed. So, depending on which browser you are utilizing, the outcome could be different, but an empty src and href can lead to corrupting user data, or like we mentioned earlier, causing the server to simply process unnecessary requests, which in turn looks like traffic, albeit unnecessary traffic, to your page. In a worst-case, if your website regularly gets a few million visitors a day, and this happens, you could very easily run out of system capacity. So, with that said, best practices would say to avoid empty source and link attributes altogether and not risk the potential headache.
Lighthouse is an open-source tool that is used to run an audit against your web pages and provides scores and suggestions for improving page performance, accessibility, SEO, and more.
PageSpeed Insights is a tool created by Google that reports on the performance of a page on both mobile and desktop devices, and provides suggestions on how that page may be improved.