"un-refactoring" the removeImage logic