Sadly, I don't think there is any possibility to maintain the photo quality. A workaround might be uploading the photo to any filehosting service that maintains quality and paste the link into one of the "Biography" sections. It won't be displayed on the tree, naturally, but this way there is a link between the person on the tree and the high-quality photo.