Since this is for a URL using `os.path.join` is actually incorrect. I know it was there before, but this will build invalid URLs on platforms that don't use `/` as their directory separator. This should really be `url = '/'.join([settings.MEDIA_URL, url.lstrip('/')])`.