West Ham have agreed to sign Roberto on a free transfer, with the Spanish goalkeeper joining on a two-year deal.
The 33-year-old is available from 1 July, when his contract with La Liga club Espanyol expires.
Roberto, an Atletico Madrid youth graduate, has played for Benfica and Real Zaragoza, and won three Greek Superleague titles with Olympiakos.
“I think everyone who follows football knows the importance of this club, so I’m really excited,” Roberto said.
Roberto arrives at the London Stadium following the departure of second-choice keeper Adrian, along with striker Andy Carroll and midfielder Samir Nasri.
Find all the latest football transfers on our dedicated page.