[deleted]
It seems there's been a great deal of ink spilled on this topic in particular so maybe I can touch on a few on the major topics at hand.
Photography has its only long and complex history beginning around c. 1830, but for our purposes I think it makes sense to focus on the international style of the late 19th and early 20th centuries often termed Pictorialism. The movement marked a departure from a evidentiary/documentary approach to photography. By manipulating the image, the photographer takes on a ‘creator function’, similar to that of the painter, rather than ‘recorder’. Photographs from this period are also noticeably more abstract in comparison to their forebears.
C. Schiendl’s early text on the rhetoric of the photographic image, Artistic Photography, published in 1889, serves an ideal source on this moment of change. Schiendl argues for photography as a marriage between art and science, concluding that the puzzle of photography’s definition lies within the “medium’s own borders”. When photography began to be scrutinized in the comparative arts, its rationale as a medium was no longer autonomous. It could no longer be seen merely as a scientific parlor game. It became subject to the same critical approaches in aesthetic philosophy as every other artistic medium, and in turn jeopardized the predominance of painting and sculpture over the portraiture genre. It goes without saying that soon after the daguerrotype was invented, it was embraced by the middle class (and even artists) as a novel gambit to have one's face recorded—and with a guaranteed physiognomic likeness! But it was with Pictorialism half a century later that a photographic portrait became not only more practical than a painted portrait, but artistic in its own right as well.
There began a new search for meaning on the part of painting ushered on by this further invasion of photography into the realm of fine art. In essays from 1912 by the modernist critic Apollinaire, and cubist artists Metzinger and Gleizes we see a distinctly modernist rhetoric which declares skepticism towards surface detail; a position which may be seen as reactionary towards innovations in photography.
Apollinaire argues the ‘virtuous painters’ or cubists, attempt to bypass their intuitions of the natural world in order to identify an underlying structure of 'purity, unity and truth'. He clarifies, “These new artists still observe nature, but they no longer copy it…” The movement towards using ambiguous naming schemes for paintings is mirrored in the larger transition towards formal ambiguity and abstraction; “It will be pure painting, as music is pure literature.”
In Gleizes and Metzinger’s manifesto on the history and intentions of ‘cubism’, the two naturally define their movement as “the true realization of Painting”. The central motivation behind their cubist style is revealed in the following line; “... the visible world becomes the real world only through the operation of thought, and … the objects that strike us most forcefully are not always those whose existence contains the greatest wealth of plastic truths.”
For painting reach its apotheosis, a great deal of Modernist theorists saw a need to commit to the medium specific qualities of painting—and this varied quite a lot between members of the avant-garde, but there was unconditional hesitation towards illusionist realism (i.e. naturalism/mimesis).
It may be worth going back a couple decades to the Nabis school painters for an anecdote of the more symbiotic role between photography and painting at the nascence of abstraction. Maurice Denis' definition of painting, "a flat surface covered with colors assembled in a certain order", itself sounds increasingly abstract. Maurice Denis, Pierre Bonnard and other Nabis painters were also active photographers. I know from personal research that Edouard Vuillard would often take photographs of his sitters than than sketching as an aid to his largely abstract compositions.
If what you're asking is, "Did the advent of photography, which made exact likenesses of real objects, make representational painting obsolete, freeing up artists to explore color fields and other non-representational art," then the answer is, "No - the opposite is true."
Photography had a profound effect on the Impressionists, and some of the earliest art photographers, like George Davison, were practicing Impressionism using photography as their medium - images of light-as-light.
There's a canonical example comparing Turner's paintings, like the impressively titled Light and Colour (Goethe’s Theory) - the Morning after the Deluge - Moses Writing the Book of Genesis, to photography of the period, especially pinhole photography (which itself was based on the optics of the camera obscura, a darkened chamber with a tiny aperture that let it light, and thus projected an inverted image against the wall opposite the aperture). Davison's "Onion Field" (reproduced at that link up there) was done with a pinhole camera; the invention of the pinhole camera was credited to Sir David Brewster in 1850 - six to seven years after Turner painted Light and Colour.
But look at some of Brewster's earlier, lensed images [like this one](https://commons.wikimedia.org/wiki/Category:Google_Art_Project_works_by_David_Brewster#/media/File:Sir_David_Brewster_(Scottish_-Abbotsford.-_Google_Art_Project.jpg), done around the same time Turner was painting. You can see the same kind of hazy sense of light in space. Objects are there, but so is... a gauzy, ethereal something in between.
Photographers were taking some of the same steps away from traditional representation that painters were. And Brewster wasn't so much an artist as a optical researcher.
According to Jonathan Crary's Techniques of the Observer, the move toward abstraction was brought about by a whole complex of other societal and scientific developments that also led up to the first photography. Crary points out that the "Goethe's theory" in Turner's title there refers to Goethe's study of afterimages - the splotches and color fields you get after rubbing your eyes or staring at something bright - which opens up the idea of seeing as something you do rather than something you experience... it's a thing that happens inside a body. Change the eye, you change the vision.
He also points to portable cameras obscura and other late 18th-early 19th century "vision devices" like the thaumatrope as reflections of this new way of understanding what seeing is, and how representation worked, and what it meant to see a thing as realistic.
(Edit: Light and Colour is 1843, not 1845....)