Fixed an issue with broken photo links when using the CDN with a separate domain name and subdomain for media.