Image editor with replace option issue

This is related to the edit function not working correctly.

When editing a file, for instance to correct an orientation issue by rotating it 90 degrees, the subsequent workflow results in loosing the original image altogether.

Here are the steps:

  1. View in image
  2. Select edit
  3. Click the rotate option
  4. Click Save
  5. Select the replace option.
  6. The image is lost and replaced by a placeholder.
  7. Also the revisions are missing so it is impossible to roll back to the previous version.

I've attached a screen recording that demonstrates the issue.