The camera cannot lie
Printed photographs began to be available to the general public around the mid 19th century. When this phrase was coined, which appears to be just a few years later, the view that a photograph was a faithful representation of a scene, in a way that a subjective painting could never be, was a reasonable one. After all, the image that falls on the photographic plate is precisely what the camera is pointing at. Phrases like 'photographic memory' supported the view of photographs as precise and infallible records.
Of course, 'the camera cannot lie' was coined before Photoshop.
Many of the earliest references to the phrase describe people's inability to believe that they look like their photographic portraits. Nevertheless, it may well be that the phrase was used ironically from the start. Whether or not people believed the notion of photographic veracity then, they certainly don't now. We know that the ubiquitous photographic images that fill our visual world are constructs rather than absolute truth. Even early manipulative techniques during the developing process could alter images to suit the photographer's intentions. Photography very soon became more an art form and less a recording process. Now, with digital formats, we are hard pressed to tell reality from fiction.
The earliest citation of the precise 'camera cannot lie' phrase I have found is from The Evening News, Lincoln, Nebraska, November 1895, complete with an intimation of the early doubts about the literal truth of the phrase:
"Photographers, especially amateur photographers, will tell you that the camera cannot lie. This only proves that photographers, especially amateur photographers, can, for the dry plate can fib as badly as the canvas on occasion."
A slightly modified version of the phrase occurs just a few months earlier, in the Ohio newspaper The Sandusky Register, February 1895:
He looked up from the proof at me and said:
'Good Lord! Do I look like that?'
'The camera doesn't lie about such things', I replied.
In his book In the South Seas, published in 1896, Robert Louis Stevenson (seen here in the South Seas), wrote:
"I doubt if these islanders are acquainted with any other mode of representation but photography; so that the picture of an event (on the old melodrama principle that 'the camera cannot lie, Joseph,') would appear strong proof of its occurrence."
A similar phrase occurs in Dion Boucicault's play The Octoroon, first performed, in New York, in 1859:
The apparatus [a camera] can't mistake. When I travelled round with this machine, the homely folks used to sing out, "Hillo, mister, this ain't like me!" "Ma'am," says I, "the apparatus can't mistake."
The Octoroon was widely described as a melodrama and it's possible that this is what Stevenson was referring to. If so, 'the apparatus can't mistake' is the direct ancestor of 'the camera cannot lie'. Whether that's correct or not, the same thought process is clearly behind both phrases.