The three treatises John wrote against the iconoclasts make an argument that the Second Council of Nicaea eventually adopted almost intact, and it turns on two distinctions.
The first is about words. Greek has more than one term for the reverence given to something, and John insists on separating them: latreia, adoration, is due to God alone and to nothing else whatever, while proskynesis, the honour of bowing before something, is given to many things, to rulers, to the gospel book, to parents. Honouring an image is the second and never the first, and the honour passes to the one depicted rather than resting on the wood.
The second is about matter, and it is the theological heart of it. The Old Testament prohibition applies to depicting a God who has never been seen. That situation changed at the incarnation, when the invisible God took flesh and became visible; to refuse to depict him is therefore to be embarrassed by the incarnation. John puts it directly: he does not worship matter, he says, but he worships the God of matter, who became matter for his sake and worked salvation through matter.
The iconoclast council of Hieria in 754 anathematised him by name. Thirty three years later the Second Council of Nicaea reversed the anathema and endorsed his theology. He is also a substantial hymnographer, and material attributed to him remains in the Byzantine liturgical books.