Yea, it’s not probably possible. You could use two separate fields, one for external urls and one for internal urls. Then for internal urls, just write the document id. In your custom maxigallery template, use: <a href="[+maxigallery.picture.externalurl+][~[+maxigallery.picture.internalurl+]~]">..
"He can have a lollipop any time he wants to. That's what it means to be a programmer."