No, the image path used is site relative.
changing the domain from using the sudomain to the main domain changes the site relative path to the uploaded image.
in the real domain, the site relative path is:
/medical/site_images/uploads/robin_small.jpg
but for the subdomain, it is already a pointer to the /medical directory, so the path gets interpreted as:
/medical/medical/site_images/uploads/robin_small.jpg