Fix EZP-23207: revert fix from EZP-22615: "Not possible to remove an image from an object"

This reverts commit 4fa0c1a588dd5dd7c20fe38f64b4c7e7035fa1dd.
Fix EZP-23207: alternative fix for EZP-22615: "Not possible to remove an image from an object"