Upfront: Image failed to process. Invalid image ID

I have fruitlessly tried to insert of replace images in the Spirit theme. When I save the image (or the cropped part of the it), the message above is displayed.

What causes this?