SAN FRANCISCO — This city is feeling under siege. It has always had its critics, but these days everyone — mea culpa, the national news media included — seems to be piling on.

Homeless sleeping on sidewalks, crack dealers near Twitter headquarters, billionaires and the destitute living uncomfortably blocks from each other.

When The Washington Post recently published a full-throated rant — the city has become “too homogeneous. Too expensive. Too tech. Too millennial. Too white. Too elite. Too bro” — a local public radio station, KQED, responded by asking residents to call in and proclaim what they love about the city.

The mayor, London Breed, began her State of the City address earlier this year lamenting that San Francisco was increasingly being portrayed as having streets that resemble “dangerous slums.”