refactored image getter to work during search