refactored image message behavior