Where are custom artist photos stored?

When editing an artist, if I upload an artist photo I assume it goes in my local database?

If I update it by pasting a url link from a website, what happens? Is it downloaded and copied to my local database? Or does it visit the link every time?