Use correct hostname and port for image links.