Who can fail to have been moved by all the images of people on their doorsteps clapping for the NHS last night? They filled TV screens and news websites, presenting a warming picture of solidarity in enforced solitude – all alone yet all together. But there are some far less reassuring images circulating on social media. Some people are saying we now all exist inside an Edward Hopper painting. It doesn’t seem to matter which one.

I assume this is because we are coldly distanced from each other, sitting at our lonely windows overlooking an eerily empty city, like the woman perched on her bed in Morning Sun, or the other looking out of a bay window in Cape Cod Morning.

“We are all Edward Hopper paintings now,” according to a WhatsApp compilation of Hopper scenes: a woman alone in a deserted cinema, a man bereft in his modern apartment, a lonely shop worker and people sitting far apart at tables for one in a diner. As is the way with memes, it’s hard to tell if this is a serious comment or a glib joke with a side order of self-pity.

Coldly distanced … Edward Hopper’s Nighthawks, 1942. Photograph: Alamy

But let’s take it seriously. If we really are all Edward Hopper paintings now, a crisis of loneliness is impending that may be one of the most fraught social consequences of Covid-19. The loss of direct human contact we’re agreeing to may be catastrophic. This, at least, is what Hopper shows us. This painter born in New York state in 1882 made solitude his life’s work. In the 1920s, while F Scott Fitzgerald was chronicling the party animals of the jazz age, he painted people who looked as if they had never been invited to a party in their lives.

Modern life is unfriendly in the extreme for Hopper. It doesn’t take a pandemic to isolate his poor souls. Cold plate-glass windows, towering urban buildings where everyone lives in self-contained apartments, gas stations in the middle of nowhere – the fabric of modern cities and landscapes is for him a machine that churns out solitude. Nor do his people find much to do with themselves.

In older art, being alone has its benefits. In paintings titled Saint Jerome in His Study, a scholarly hermit looks perfectly at ease in his well-designed home office with his books, his cool desk – and his pet lion. In another way, the Romantic out for a walk in Caspar David Friedrich’s painting The Wanderer Above the Sea of Fog actively seeks splendid isolation so he can absorb sublime nature without human disturbance. He’s happy by himself – terrifyingly so.

Atomised individuals … Edward Hopper’s Morning Sun, 1952. Photograph: Alamy

But it’s not such images of contented or chosen solitude that are being shared today. It’s Hopper’s horrors – and that isn’t too strong a word. One of the painter’s biggest fans was Alfred Hitchcock, who famously based the Bates mansion in Psycho on a Hopper painting of a strange old house isolated by a railroad.

We all hope to defy Hopper’s terrifying vision of alienated, atomised individuals and instead survive as a community. But, ironically, we have to do that by staying apart and it may be cruelly dishonest – the empty propaganda of the virus war – to pretend everyone is perfectly OK at home.

For the message of Hopper is that modern life can be very lonely. His people are as isolated among others in a diner or restaurant as they are at their apartment windows. In this he is typical of modernist art. Edvard Munch had already shown in his nightmarish Evening on Karl Johan Street that a crowd can be a very isolating place to be.

Today, we’re simply better at hiding the isolation that these artists thought defined the modern condition. In normal times, we sit alone in cafes, too, except we’ve now got mobile phones to make us feel social. The fact is that modernity throws masses of people into urban lifestyles that are totally cut off from the gregariousness that was once the norm.

Lonely in a crowd … Edvard Munch’s Evening on Karl Johan Street, 1892.

Photograph: Alamy

In pre-industrial times, Bruegel’s scenes of peasant life show a world in which it was practically impossible to be alone. Kitchens are crammed and carnivals a nightmare for anyone practising physical distancing. Looking at Bruegel, you can see why many people in Britain were so reluctant to give up pubs – those last refuges of the Bruegelian past.

We choose modern loneliness because we want to be free. But now the art of Hopper poses a tough question: when the freedoms of modern life are removed, what’s left but loneliness?