SUSAN SONTAG understood that photographs are unreliable narrators. “Despite the presumption of veracity that gives all photographs authority, interest, seductiveness,” she wrote, “the work that photographers do is no generic exception to the usually shady commerce between art and truth.” But what if even that presumption of veracity disappeared? Today, the events captured in realistic-looking or -sounding video and audio recordings need never have happened. They can instead be generated automatically, by powerful computers and machine-learning software. The catch-all term for these computational productions is “deepfakes”.

The term first appeared on Reddit, a messaging board, as the username for an account which was producing fake videos of female celebrities having sex. An entire community sprung up around the creation of these videos, writing software tools that let anyone automatically paste one person’s face onto the body of another. Reddit shut the community down, but the technology was out there. Soon it was being applied to political figures and actors. In one uncanny clip Jim Carrey’s face is melded with Jack Nicholson’s in a scene from “The Shining”.

Tools for editing media manually have existed for decades—think Photoshop. The power and peril of deepfakes is that they make fakery cheaper than ever before. Before deepfakes, a powerful computer and a good chunk of a university degree were needed to produce a realistic fake video of someone. Now some photos and an internet connection are all that is required.

The production of a deepfake about, say, Barack Obama, starts with lots of pictures of the former president (this, incidentally, means that celebrities are easier to deepfake than normal people, as the internet holds more data that describe them). These photos are fed into a piece of software known as a neural network, which makes statistical connections between the visual appearance of Mr Obama and whatever aspect of him you wish to fake. If you want to go down the ventriloquist route and have Mr Obama say things that the man himself has never said, then you must direct your software to learn the associations between particular words and the shape of Mr Obama’s mouth as he says them. To affix his face onto another person’s moving body, you must direct the software to learn the associations between face and body.

To make the imagery more realistic, you can have the software compete with a copy of itself, one version generating imagery, and the other trying to spot fakes. This technique, known as a generative adversarial networks (GAN), is the purest form of deepfake, conjuring up images that are entirely unique, not just using machine learning to mash existing photos together. The image-generating software will keep improving until it finds a way to beat the network that is spotting fakes, producing images that are statistically precise, pure computational hallucinations—even if still dodgy to the human eye. The computer can generate images which are statistically accurate representations of a dog, for instance, while still not quite understanding the visual nuances of fur. Currently this lends GAN images a creepy edge, but that is likely to evaporate in future, as the technique improves.

The consequences of cheap, widespread fakery are likely to be profound, albeit slow to unfold. Plenty worry about the possible impact that believable, fake footage of politicians might have on civil society—from a further loss of trust in media to the potential for electoral distortions. These technologies could also be deployed against softer targets: it might be used, for instance, to bully classmates by creating imagery of them in embarrassing situations. And it is not hard to imagine marketers and advertisers using deepfake tools to automatically tweak the imagery in adverts and promotional materials, optimising them for maximal engagement—the faces of models morphed into ideals of beauty that are customised for each viewer, pushing consumers to make aspirational purchases. In a world that was already saturated with extreme imagery, deepfakes make it plausible to push that even further, leaving Ms Sontag’s “presumption of veracity” truly dead in the water.