Spoilers ahead.

NINETY-NINE years ago today, in France’s Belleau Wood, U.S. soldiers launched their first large-scale battle in the “War to End All Wars.” By month’s end, after nearly 10,000 men died, the United States won that fight, but not before the German Gen. Erich Ludendorff had unleashed not only machine guns but also nerve gas.

Flash-forward a century, to April in President Bashar al-Assad’s Syria, and the world’s eyes were horrified when scores of civilians died in a sarin-gas attack on the town of Khan Sheikhoun. If you saw the recent images out of Syria, as gassed children were hosed down as they gasped for life, then it is difficult to watch the new “Wonder Woman” and not be struck by a long constant in the cruel fog of war.

In director Patty Jenkins’s film, in an affecting scene that sets up the third act, the Amazon warrior rides into the Belgium town that she had just saved. Where she had been hailed as a hero by the warm people of Veld, there now hangs a fog of orange gas that has wiped them out — the result of Gen. Ludendorff’s fresh attack fired off from a nearby castle.

We experience the scene through Wonder Woman’s shock and sorrow and rage — and it is not hard to relate to her visceral reaction.

“My mother keeps talking about that,” Jenkins tells The Post’s Comic Riffs. “She’s like: ‘It’s so prescient — what the movie is showing is what is actually going on right now.’ ”

While making the film, of course, she had no idea that the Syrian video images would be so very much with us right now.

“So much of what has happened now [there] wasn’t happening cumulatively as much as it has been recently,” Jenkins says of the coincidental timing. “It’s shocking. It came so naturally to our World War I [setting]. The fact that it keeps happening is horrifying.”

World War I, given its bitter toll of stalemated trench warfare, increasingly became a race to create chemical weapons, from tear gas to chlorine gas to the especially deadly phosgene and diphosgene gases, which were launched in artillery shells.

What Wonder Woman comes upon is a mustard gas — yellow-brown in real life, but a saturated orange in the film. She wades into the fog physically unharmed because she is a goddess, but because she has only recently experienced the depths of man’s inhumanity to man (and children), she comes away with different wounds.

“It’s a very important story beat — Patty wants the audience to experience emotionally what the character is going through,” says Matthew Jensen, the film’s director of photography. “I think ultimately, we always knew that we had to stay with Diana’s experience.”

Jensen says showing a colored gas also allowed the filmmakers to imply the fatal toll without literally representing an “uneasy mix” of violence.

“We had to adhere to a PG-13 rating, so we had to be very judicious with images of death,” he says. “And there was a moral responsibility that we felt. You can suggest so much more than by showing something directly. … Because you can show everything now doesn’t mean that you should.”

(As for showing the stark gas itself, Jensen says: “We knew this scene was going to take place at dusk — it was going to have a somber and cool look — but then you have this complementary orange … which we thought would be a very powerful image.”)

What Jenkins is also trying to depict in these scenes, from a very personal place, is the moral fog of war.

“My father, interestingly, he became a fighter pilot and he did everything he could because of World War II,” says the director, noting how his “pure vision” of right and wrong in the wake of that war influenced his decision to enter the Air Force in the 1960s.

“When I was a kid, he was in Vietnam dropping bombs on villagers because those were his orders,” Jenkins says of her father, who would be awarded a Silver Star. “And later, he was deeply conflicted about what had become of him. He wanted to be a hero. He had wanted to save the world. How was he now this person?”

Ultimately, Jenkins roots her movie not in the sweeping pageantry of military victory but rather in the burden of a singular mission.

“This movie isn’t about being a hero,” the director says. “It’s about the reality of how difficult and how hard [fighting] is to do. And so I try to bring the kind of weight and romance of the fighter pilot I grew up around, and having seen the struggles that they went through for being just men who couldn’t save the world.”

Read more:

A look back at Wonder Woman’s feminist (and not-so-feminist) history

How ‘Wonder Woman’ director Patty Jenkins cracked the superhero-movie glass ceiling

‘Wonder Woman’ marks DC’s triumphant return to great storytelling