I never liked that SO/SE relied on the external gravatar service, so I was glad to read that it doesn't any more. However, it turns out that one cannot use as profile picture a PNG file with transparent background (something that is supported by gravatar):
Above is a screen capture of my profile page, with a profile picture that has a transparent background. That background is turned into black, which I suppose is a bug.
The method of upload doesn't change anything (I uploaded it manually to imgur, but the same black background is observed). See the difference between the two following URLs:
The problem is thus in the resizing code from imgur.