Recently, my congregation moved into a temporary space while a new building is under construction. This space is essentially a single large room into which all the various elements of the old building have been moved: a sitting area, a kitchen, a classroom, and a synagogue. The classroom in the old building had pictures of gedolim, but now they are obviously in the single gigantic room that constitutes the synagogue's space. The pictures are not on the wall that the aron kodesh is on, but if you are in the women's side, then you are facing one such picture, and on the men's side a few pictures are behind you. This would appear to not be permissible, but when I asked the rabbi about it, he said that "the shul only extends to here" (gesturing to an invisible line on the floor).
This is clearly a case of oneis and the particulars would have to be examined by a rav, but in general, is the halakha that one can make such a declaration and obviate the halakha or possibly minhag to not have pictures of humans or animals in the room where one prays? Does the oneis matter in this case?