Sen. Elizabeth Warren’s image-boosting trip to Iraq once again opens her up to criticism that she’s got her eyes on 2020 rather than her re-election campaign in Massachusetts.

While Warren was meeting with troops and the Iraqi prime minister, her GOP opponents were sweating it out in Fourth of July parades and fireworks celebrations from Plymouth to Gloucester.

“For her to go to Iraq now is nothing more than a photo op for her presidential ambitions,” said Holly Robichaud, chief adviser for state Rep. Geoff Diehl’s U.S. Senate bid.

Warren has scheduled a “town hall” meeting in Natick this coming weekend but even those events have been largely scripted, with Warren’s campaign packing the event with sticker-wearing supporters.

The first-term Massachusetts Democrat with a national following of die-hard supporters has tended to stay away from events like parades, where she could be susceptible to unexpected questions or heckling from opponents.

She’s much more comfortable giving speeches in Washington or at conventions like Netroots Nation, where she knows she’ll get a rousing welcome from liberal supporters. Last weekend Warren was the headline speaker at a rally protesting President Trump’s immigration policies.

Not exactly a tough crowd.

“She doesn’t want anything unscripted. She doesn’t want to answer questions from the people,” Robichaud said.

But eventually Warren is going to stick around Mass­achusetts long enough to engage in real campaigning.

She can’t avoid her Republican critics forever. And she can’t avoid impromptu campaign stops that might include voters who aren’t on the Warren bandwagon.

Warren is a heavy favorite to win a second term but that doesn’t mean she’s a shoo-in. Polls show her with big, double-digit leads over her opponents, but some of that is due to the fact that her Republican rivals aren’t as well-known or well-funded.

After the Sept. 4 primary, the race will heat up and Warren will know who she’s facing — whether it’s Diehl, former state Consumer Affairs Director Beth Lindstrom or businessman John Kingston.

And she’d be wise not to take for granted her campaign.

This is a year of upsets and upstarts, and if her GOP opponent unexpectedly catches fire, that lead in the polls could narrow significantly. Conservative super PACs are expected to get involved in the race, funding a barrage of anti-Warren ads.

Trump also could be a wild card. He’d love to see Warren get bashed around and be forced to have a real campaign.

Just last week, Diehl quietly made a trip to the White House, meeting with political staffers, according to Robichaud.

The Diehl connection to Trump — Diehl was his state campaign co-chairman in 2016 — could be a double-edged sword. It should help Diehl in his primary campaign, but could hurt him in the general election, where he needs to appeal to independent voters.

Would Trump dare make a trip to Massachusetts to bash Warren in person? It might not be the smartest political strategy, but boy, what a show that would be.