CHICAGO — Star outfielder Yoenis Cespedes is expected to opt out of his contract with the Mets after the World Series, allowing him to test free agency. But teammate Curtis Granderson doesn’t believe it’s a given that the slugger will wear a new uniform next season.

“If he does do it [opt out], it doesn’t necessarily mean that all is lost,” Granderson said Friday, when he became the fourth Met to win the Roberto Clemente Award for community service. “It just means that there might need to be some restructuring that has to be done to bring him back.”

Cespedes’ looming free agency is the biggest question facing the Mets, who are coming off their second straight postseason appearance. The 31-year-old had a .280/.354/.530 slash line, 31 homers and 86 RBIs, again establishing himself as the biggest presence in the Mets’ lineup.

“He’s as close to a five-tool athlete as I’ve seen,” Granderson said. “When he’s healthy, he can steal bases and gets down the line better than anybody I’ve seen. He hits for power, he hits for average. He can play all three outfield positions. He has one of the best arms in the game.”

The Mets have not ruled out re-signing Cespedes, though as was the case last offseason, there will be significant hurdles. Cespedes would be one of the best hitters available in free agency, and rival executives believe his market will be robust.

“Just to find a person like that in the game that would be available I think is few and far between,” Granderson said. “Plus, everyone loves him in the clubhouse. He gets along great with everybody. I think he loves being in the city of New York and New Yorkers all like him. So I think it would be huge to get him back there.”

advertisement | advertise on newsday

If Cespedes returns, Granderson could find himself playing centerfield as he did in the second half of 2016, even though he primarily had been a rightfielder in recent years. He expressed a willingness to play center in 2017 despite some reservations this past season.

“I actually surprised myself,” he said. “I wasn’t sure if I would be able to early on for the amount of time. But as I kept staying out there, kept doing it, I just kept listening to my body more and working with the trainers, I found out as long as I kept doing everything I was doing in rightfield, I’ll still be able to do the same thing in centerfield.”

Granderson, 35, has long been one of the game’s foremost philanthropists. Before games, his laptop is a constant presence at his locker, where he often can be seen conducting business for his Grand Kids Foundation. His gifts include a $5-million donation to his alma mater, the University of Illinois-Chicago, for the construction of a baseball field that now bears his name.

The Clemente Award is named for the Pirates Hall of Famer who perished in a plane crash on New Year’s Eve in 1972. He had been bound for Nicaragua, where he intended to deliver earthquake relief aid.

Granderson joins Gary Carter, Al Leiter and Carlos Delgado as Mets who have won the award. “What Roberto Clemente stood for,’’ Granderson said, “his family is living proof of what it was to not only be a professional athlete but professional human being.”