Images produce unlink icon when copied locally

I’m quite puzzled by this problem, which can be reproduced in our instance after upgrading to v2.4.0.beta1 +225 as well.

???

We don’t even know hot to debug this. There is nothing we have found in the diffs or error logs in Discourse. Strange.