components #5.12.x :  fixing bug #5036
checking places of image before deleting it...