I also think that the increased use of photography as a medium had a great deal to do with the decline in realism. But other social factors had to be there to allow much of Modern Art to prevail in the mainstream.
I don't think that photography had any significant role in the rise of modernism in art (other than perhaps to put out of business a certain segment of the market for highly realistic pictures ... most notably, non-artistic ones).
Consider what was happening in all of the arts and not just drawing and painting. In music we saw a peak in the quality of composition in the late 19th century and then it dissolved into an auditory version of the same mess as Pollock. In literature we saw at about the same time phenomena like James Joyce and Gertrude Stein. In sculpture at the same time we saw at first melted versions of reality and then mere piles of garbage being called "sculpture". Photography couldn't have caused this kind of broad change in the arts. For what it's worth, the change that happened at about the same time was also reflected in many other intellectual eras too. In politics we saw the rise of the Nazis and Marxists. In science we saw a series of attacks on rationality, causality, and truth. In economics we saw the development of all sorts of "something for nothing" theories (like Keynes for example) that became prominent. The root of these changes was not photographic, but philosophical. You can see the common root of all of these bad ideas in Hume, Kant, Hegel, Schopenhauer, and Kierkegaard starting 100 years before their ideas became ubiquitous and the logical consequences followed.
--- Brian Yoder