Here is the summary of a great article from ReligionFacts.com. I highly recommend the full article.
Judaism, Christianity and Islam all consider idolatry a heinous sin. The Qur’an does not prohibit making images, only worshipping them. Hadith clearly and consistently prohibits all images of any living being, with special mention of punishment for painters. One exception to this rule is dolls for children, probably because children are not considered in danger of worshipping them as idols. Neither the Qur’an nor hadith mention depictions of Muhammad. The hadith prohibiting images are directed at Muslims only (e.g. Muslims are instructed not to enter buildings where there are images, not to demand their removal). Muslim outrage against depictions of the Prophet does not usually extend to outrage against all images. The hadith prohibiting images do not call for Muslims to take action against those who make images, but instead say that God will punish them severely at the Day of Judgment. Muslims have applied the prohibitions against images in various ways throughout history and there is still some variation today. Figurative art of Muhammad and other humans has been a significant part of late medieval Islamic art. But it was generally limited to secular contexts and elite classes who could afford fine art. Shi’ites tend to be more open to religious images than Sunnis. The main reason given for not depicting Muhammad is to avoid the temptation to worship the image. Neither the Qur’an nor hadith say that viewing an image accidentally is a sin, but in the hadith the Prophet teaches Muslims to avoid them.