Q. What is the reason for the custom to cover pictures in a house of mourning? Why was the custom enacted, seeing as photography was non-existent before 5587?

A. See question above in regards to covering mirrors. Shulchan Aruch (O. H. 90: 23) discourages (Rema ibid., prohibits) praying in front of decorated clothing and art work as it may interfere with one’s necessary concentration on the tefila.
Orchois Rabbenu (1: p. 57, 188) mentions that the Steipler Gaon zt”l would not daven shemone- essrei in a decorated suka. See also Kaf Hachaim (ibid.).
Poskim also mention that praying in front of a human picture, even of a Godol or great sage, is prohibited as it may seem that you are davening to him, ( Vayishma Moshe p. 269).
Others add that in a mourners house, art in display may be adding joy to the viewers and should be avoided (ibid.)
Horav Shlomo Miller’s Shlit’a opinion is not to daven facing any picture.

Rabbi A. Bartfeld as revised by Horav Shlomo Miller Shlit’a.