The second gap is inside an "island," but the first "licit" gap makes the whole sentence feel okay to a native speaker.
"Who did you see [a picture of ___]?" (The phrase is the object). Islands
Linguists debate whether these "walls" are built into our mental grammar or caused by how we process information. 1. The Architectural View The second gap is inside an "island," but
"*Who did [a picture of ___] hang on the wall?" (The phrase is the subject). Why Do Islands Exist? Islands
"Which book did you file ___ [without reading ___]?"
Many generative grammarians argue that islands are a result of the of human language.