Improved image add/remove functionality