It is popular to attack the media, but Thursday's deadly shooting at the Capital Gazette in Annapolis is putting the news media's relationship with the public in the spotlight anew.

Generalizations about those in the journalism community regularly come from both sides of the aisle. Very often, their criticism is fair, warranted and even a helpful check on the profession. But in many cases the critiques are unjustified, based on false premises and are accompanied by harassment that ultimately becomes a distraction.

These critiques — and at worst attacks — are part of why some members of the public have such little trust in the media. According to a June Gallup/Knight Foundation survey, some Americans said they believe 80 percent of the news they see on social media is biased and that 64 percent of it is misinformation. They said they believe 44 percent of the news they get directly from newspapers, television or radio is misinformation.

Those disinclined to trust the media get reinforcement when highly influential politicians and partisan media figures elevate the critiques, sometimes making personal jabs at journalists’ motives and their character. What may start as a difference of opinion eventually becomes a direct assault on the humanity of those in the media — something that those following press freedom issues have witnessed in other parts of the world.

Fox News host Tucker Carlson recently told his viewers they should distrust news reports from the “big news stations.”

“If you're looking to understand what's actually happening in this country, always assume the opposite of whatever they're telling you on the big news stations,” he said, disregarding the fact that Fox News leads the ratings of cable news outlets.

President Trump regularly attacks media outlets and specific journalists, knowing that large segments of his base will view any outlet remotely critical of him negatively and turn around to boo those outlets' representatives at rallies.

It is not the fault of the president or media personalities that a man with a vendetta against the Capital Gazette killed five of the newspaper's employees on Thursday. But calling journalists the enemy of the American people, which Trump does regularly, does not help promote civility.

Over the past several years, the vitriol directed at members of the media has intensified in ways few Americans talk about any other professional community. When someone determines an individual’s identity is primarily in their profession, if that person’s views of that profession are low, there are real ramifications.

After Thursday’s deadly newsroom incident, journalists took to social media to share what that has looked like in their own lives.

It may be hard to remember this in our times where partisan commentary is increasingly prevalent, but it is not the job of journalists to affirm the political views or other opinions of their readers — and especially not of the politicians they cover.

Thursday's shooting is prompting memorials to the deceased journalists, discussions about the mission of the profession, and recognition of the perils of it. Here's hoping those themes become a more prevalent part of the discourse.