At least for now, all talk of Yoenis Cespedes’ nagging hamstring injuries can be put to rest.

The Mets slugger, who has missed time this season with issues in his left and right hamstrings, went 4-for-6 with a double, an RBI and two runs scored in Friday night’s 14-2 rout of the Rockies at Citi Field.

This after a 2-for-23 start to July.

Cespedes hit a flare down the rightfield line in the third, and his hustle out of the batter’s box allowed him to slide into second base safely ahead of Carlos Gonzalez’s throw.

He singled for his second hit of the inning as the Mets scored six runs and sent 11 batters to the plate in the third.

“Like I said before the All-Star break, getting everybody back is going to be a big key,” said starter Jacob deGrom, who struck out 11 in eight innings. “To see him out there being able to run 100 percent is definitely a plus.”

Fans of Cespedes have grown accustomed to laser throws from the outfield, and with strong legs beneath him, he threw out DJ LeMahieu attempting to score on Gerardo Parra’s medium fly ball to left in the sixth.

advertisement | advertise on newsday

LeMahieu initially was ruled safe, but after a one-minute, 20-second review, the call was reversed.

Cespedes, who didn’t speak to reporters after the game, showcased his fresh legs again in the bottom of the eighth, beating out an infield single to third baseman Pat Valaika with the bases loaded to drive in Curtis Granderson from third.

“I thought he had a tremendous game,” manager Terry Collins said. “He not only threw the runner out at the plate, but you saw he has all the skills. He beat out a ground ball, took another ball, turned it into a double. Hopefully that tells you that his legs are feeling much better, because if we’re going to get in it, he’s going to lead the way.”

The Mets are 40-47, in fourth place in the NL East, 12 games behind the first-place Nationals and 9 1⁄2 games out of a wild-card spot. A significant run, while unlikely, is not impossible. For the Mets to have any chance to pick up ground, a fully healthy Cespedes is paramount.

He hasn’t homered since June 23, a span of 13 games. But Collins and the Mets appear happy with the steps he has taken, especially after dealing with leg issues for most of the 2017 season.

Mets videos

“He’s a huge piece of this team,” said Michael Conforto, who hit a three-run home run in the seventh. “It’s definitely nice to see him running around, beating out infield singles and hustling out doubles.

“When he’s firing on all cylinders, he’s kind of an X-factor for us.”