That is the opinion of former Hammers striker and Sky Sports pundit Carlton Cole, who says the deal depends on manager Manuel Pellegrini and owners David Gold and David Sullivan.
Nasri has not played for 12 months after a World Anti-Doping Agency ban issued to him last year.
The midfielder was handed the ban after details emerged from an intravenous drip he received while in Los Angeles on 26 December 2016.
WADA intervened after the former Manchester City midfielder’s move to Turkish side Antalyaspor, for whom he only played eight games before having his contract terminated this January.
Seeking a return to the English game, Nasri is now training with West Ham after undergoing a medical with the club last week.
Hammers boss Pellegrini worked with the silky midfielder at City, where the pair won one Premier League and League Cup.
The east London club were unwilling to meet the player’s contract demand, however, which is thought to be an £80,000-a-week, six-month deal.
Nasri is currently training with the first team in order to gain a deal, and Cole believes his relationship with Pellegrini may pay dividends.
“I think the manager has a good relationship with him,” Cole told Sky Sports.
“We know his class a classy player.”
Nasri started his club career in England with Arsenal but went trophyless at the Emirates Stadium despite three strong individual seasons.
His six-year City spell was far more fruitful, but Nasri, now 31, found it difficult to compete with the younger, more athletic members of the ever-improving squad.
Nevertheless, Cole feels the Frenchman still garners a top-level quality which would give him an edge in the West Ham team if Pellegrini, Gold and Sullivan decided to snap him up.
“He will bring something different to the squad and he has that experience too,” Cole continued.
“It will be a great addition to the squadbut it depends what the manager wants and what the owners want.”