refactory image view utility.