Can't display image in page properties macro when updated via API

I have spend the last 2 days without luck either and it isn’t related to faulty uploads as if you upload initial versions and insert them into the page tree they display just fine. Just having multiple versions result in a breaking page. Uploading a new version of an attachment breaks the image preview