The bug was triggered when using a full url in settings.MEDIA_URL instead of only a folder name.
The previous check would add base_url before our settings.MEDIA_URL if our url started with settings.MEDIA_URL, and now it adds it only if our url don't start with "http" (prevent adding "https://example.ext" before "https://media-example.ext").
PR made following this conversation in a previous PR.
The bug was triggered when using a full url in settings.MEDIA_URL instead of only a folder name.
The previous check would add base_url before our settings.MEDIA_URL if our url started with settings.MEDIA_URL, and now it adds it only if our url don't start with "http" (prevent adding "https://example.ext" before "https://media-example.ext").