I just checked several topics on my site by looking at the "og:image" property. If the file was actually attached (meaning it was in the section defined for uploads in the storage settings), the first image attached was used. If there was an image pasted from an external URL, the og:image returned the default share image.
After looking at an entire page of topics, I could not find any that had an og:image return an external image.
If you want to look for yourself, view the page source code and look for:
<meta property="og:image" content="XXX">