Back in June, Washington’s new zero-tolerance policy on the southern border was creating a firestorm. Parents caught crossing illegally were separated from their children, and heartbreaking photos of crying toddlers forced President Trump to call a time-out.

I wrote then that the policy was basically right, but being right wasn’t always enough. This was one of those times because the “image-driven stampede of public opinion” made rational debate impossible and threatened to hand Democrats a huge election victory in November.

Fast-forward to the present, and images again are driving public opinion on immigration. Only this time, photos of the seemingly endless caravans of thousands of Central American migrants vowing to cross our border, one way or another, are evoking different sentiments.

Now the Dems are on the defensive as Trump sends the military and a clear message that he will defend America’s sovereignty in the face of what he calls an “invasion.”

The change is striking. Four months ago, critics on the left wouldn’t shut up about the border and some, like Mayor Bill de Blasio, made grandstanding trips to Texas detention facilities and held press conferences to denounce Trump in the harshest possible language. Now, despite the president’s tough talk and use of the military, leftist pols hardly make a peep, fearful that defending the caravan could be political suicide.

The stark turnaround serves as a reminder of how quickly the political winds can change direction. Recall that Dems shut down the government over the “Dreamers” legislation, but got nothing but blame and now rarely mention the issue.

And while immigration looked like a sure loser for the GOP in June, the sheer size of the caravan, and the violence displayed by some marchers in Guatemala and Mexico, is galvanizing Republican and conservative voters and could tip next week’s midterms.

Trump’s latest wrinkle, a controversial bid to end birthright citizenship for the children of illegal immigrants, reveals both his commitment to the issue and the political opportunity he sees. He stresses the caravan in the numerous rallies he’s holding for GOP candidates, and tweets about it often.

“Many Gang Members and some very bad people are mixed into the Caravan heading to our Southern Border,” he wrote Monday. “ Please go back, you will not be admitted into the United States unless you go through the legal process. This is an invasion of our Country and our Military is waiting for you!”

In an interview with Laura Ingraham on Fox News, the president also proudly embraced the term “nationalist.”

“It means I love the country, it means I’m fighting for the country,” Trump said. “I look at two things, globalists and nationalists. I’m somebody that wants to take care of our country” and cited securing the border as an example.

Immigration reform has vexed Washington since 1986, when Ronald Reagan signed what all agreed would be the last amnesty bill. But the borders were never secured, and the 3 million illegal immigrants covered by that deal have been dwarfed by three decades of easy access for illegal crossers, well-coached asylum seekers and millions of visa holders who never leave.

Trump has targeted the problem from the day he announced his campaign in 2015 and his vow to build a wall is popular with many voters. But he’s had no success in getting Congress to rewrite the laws or fully fund the wall despite the GOP holding majorities in both houses.

Yet border control is still a powerful message and the silence of the Dems about the caravan is instructive of the trap they face.

If they support the use of the military or any other Trump measure aimed at blocking entry, they risk turning off the party’s leftist base on the eve of Election Day. On the other hand, if they object too loudly and demand sympathy for thousands of unvetted migrants, Trump will have fresh reason to brand them as favoring open borders and illegal immigrants over law-abiding citizens.

Silence is not usually the best option in politics, but in this case, it’s the only one that makes sense for Democrats.

Unfortunately for them, Trump has both the advantage and the bully pulpit. He pressed his point Tuesday by asserting that he has the power to issue an executive order that ends birthright citizenship.

Many on the left immediately howled in protest, and most legal scholars believe the Constitution’s 14th Amendment provides citizenship to anyone born here, though others believe legislation could pass muster.

For now, it doesn’t really matter. Trump got the attention and reaction he wanted, showing again why next Tuesday could be full of surprises.

Warren’s gene-ius move? Hardly

Democratic guru David Axelrod calls Elizabeth Warren’s DNA test “a head-scratcher.” He tells Politico magazine: “First of all, the timing of it was odd: Why intrude on this midterm process that way? Secondly, it was instructive for everyone. It’s hard to get the upper hand with Trump in a kind of skunk fight.

“I think she was trying to push back because she didn’t want to have him continue on what is another version of, like, birtherism, and she thought she could end that discussion. But what she mostly did was elevate the issue, and that was the gamble. And I would say they lost that gamble.”

$leazy does it for Gilly

Incumbent pols have many advantages, one being the sly way they use taxpayer funds for campaign purposes. Most get away with it, but Sen. Kirsten Gillibrand is so arrogant, she practically admits that’s what she’s doing.

“We’re trying to do it a little differently,” Gillibrand told the New York Times about her re-election bid. “What that looks like is I’ve done 16 town halls; I’ve been to all 62 counties; I’m trying to really create a grass-roots-oriented campaign and a modern campaign.”

Actually, there’s nothing modern about it. Tammany Hall long ago perfected the art of the steal.

Chele Farley, her GOP/conservative opponent, also points out that much of the campaign money Gillibrand is spending is aimed at voters outside New York. That suggests Gillibrand is planning to run for president in 2020, despite a promise to serve a full term if she is re-elected.

Farley demands that Gillibrand repay the costs of the town hall meetings, and the state GOP complained to the Senate Ethics Committee that all 16 events “were nothing more than publicly funded campaign rallies.”

Gillibrand’s own words are the best evidence against her.

Cuomo’s 9/11 analogy a dud

Block that analogy.

Gov. Andrew Cuomo told his brother, CNN anchor Chris Cuomo, what went through his mind when the first unexploded pipe bombs were discovered.

“To use a frightening analogy, for me, it reminded me of when the first plane hit the World Trade Center on 9/11. And you said, ‘Well, maybe it’s just an aviation accident.’

“And then the second plane hit. The [George] Soros receipt of the bomb, people investigated, et cetera, but we really didn’t know what it meant.”