Islamic canon law (the Shariah) is derived from primary texts (the Quran and Hadith) and uses interpretive methodologies (like deductive analogy - Qiyas) to derive rulings that are not explicitly discussed in the primary source material. This gives some amount of openness and causes some differences of opinion resulting in multiple schools of thought.
Practicing Muslims rely on books and texts that systematize this knowledge and provide it in a practical form for daily use rather than go to the source material (which can be overwhelming if one wants to find, for example, the ruling on whether a certain action in a specific context is permissible or not). Most Muslim children, as part of their basic religious education, learn the basics of Islamic law and practice from such a book. That's usually enough to go through ones life.
The ruling on representational art is based on this kind of derivation. There are some exceptions (e.g. for educational, security etc. purposes) but they're generally narrowly circumscribed.
Sunni tradition relies primarily on the Quran and 6 books of Hadith (of which the two you've mentioned are the main ones). Shia tradition has a smaller Hadith corpus because of theological differences about the reliability of the chains of narration of the Hadith and hence the derived rulings are very different in some areas. I've generally seen Shia works of art where prophetic companions, angels etc. are pictured but non-realistically (unlike Christian iconography). Some of them blank out the faces but it's not a tradition I'm deeply familiar with so I don't know.
My theory is that the huge emphasis on calligraphy and tesselations in Islamic art is mainly because of this. We don't have (many) paintings and sculptures of religious figures like in the Christian traditions.