Traffic is not correlated to the location where the files are being stored, so to answer your question OP - no, it does not matter, because you won't get more traffic just because you hosted your images on your site and not on Amazon for example. Images rank based on keywords, alt tags and other dozen factors, but hosting location is not one of them!
To decide whether to host yourself or link to a third party, it depends on your needs on issues such as speed and bandwidth. If you are on a limited bandwidth host (newbies just starting out in IM for example), it makes sense to host your files somewhere else, so you don't consume and pay for extra bandwidth and depending on how many images you have, their file size and number of visitors, the bandwidth costs can add up a lot. However, most hosts nowadays offer unlimited bandwidth, so this is not a problem. The bandwidth is NEVER actually unlimited (it's just a marketing trick), but it's enough to handle hundreds of thousands of visitors, and/or images depending on the type of host you choose (shared, vps or dedi). So bandwidth wouldn't really be a problem.
Regarding site speed, it's gonna be the same if you don't have a shitty host and you optimized your images properly. Seriously, I have tried both and didn't really notice any difference. First, I optimize my images with Kraken to reduce their file size (while still keeping same image quality in human eyes) from MB-s to KB-s - usually the compression ratio is at about 70-80%, so the final image size is usually just a couple hundred kilobytes. Then, you need to make sure your host is fast enough, so that means no
EIG shit and at least a VPS or dedi over shared hosting. But even with a fast SSD shared hosting, you can still get along fine as long as you are not overloading their servers.
Now, if you want to have total control over your images/files, then hosting them yourself and keeping backups is the best option. But other options such as Amazon S3 for example are quite as good (mind the bandwidth costs though on S3 because it's not free at all after the 1-year trial). After all, your images would get lost if Amazon fucks up or goes out of business and I don't see that happening any time soon. Same thing with Google or Microsoft, all are viable options.
As you can see, once you make this analysis, it becomes pretty clear that self-hosting your images is the better option in the long run. However, as I said above, the location of your images does not matter at all for getting more traffic!