The 33-year-old arrived at London Stadium on a two-year deal as a free agent during the summer as a cover for Lukasz Fabianski but failed to impress.
Roberto featured in eight Premier League games before he got dropped following series of errors, and David Martin replaced him.
West Ham have now re-signed Darren Randolph, and while they will be happy to see the back of Roberto, they are set to take a loss as they will be paying 75% of his wages.
West Ham have found a club for Roberto – heading to Alaves on loan for rest of the season. Understand that West Ham are paying 75% of his wages #whufc
— Jacob Steinberg (@JacobSteinberg) January 17, 2020
With Fabianski currently injured, Randolph is expected to be in goal until his return, and the former Middlesbrough goalie will fancy his chances of challenging the Poland international.
Former West Ham director of football Mario Husillos described Roberto as a fantastic goalkeeper following his arrival last summer, but he clearly let everyone down after those gaffes, and he has likely played his last game for the club.
The Spaniard is on £30,000-a-week, so West Ham will part with £22,500 weekly while he is at Alaves.