The following is taken from ‘The Lawful and The Prohibited in Islam’ by Dr. Yusuf al-qaradawi. It makes a lot of sense keeping in mind that Islam is a very practical religion.
Photographs are not forbidden. Photographic pictures are basically permissible. They become haram only when the subject matter is haram, as, for example, in the case of idols, individuals who are revered either because of their religious or worldly status, especially the leaders of idolaters, Communists or other unbelievers, or immoral individuals such as actors and entertainers.
No Muslim would disagree concerning the prohibition of photographing subjects whose portrayal is against the beliefs, morals, and laws of Islam. Thus there cannot be any doubt concerning the prohibition of photographs, drawings, and paintings of nude or semi-nudes, of those parts of the male or female body which excite lust, or of pictures of men and women in sexy poses such as one sees in various magazines, newspapers, and on the billboards of movie "heaters. It is haram to make such pictures, to publish them, to buy them, to take them into homes, offices or shops, or to hang them on walls. It is haram to have the intention of looking at them.
Even those who are very strict in classifying all kinds of figures, including photographs, as detestable, exempt, according to necessity, pictures retained for identity cards, passports, keeping a record of suspects and criminals, pictures for instructional purposes, and so on, with the proviso that there is no intention of respect or sanctification of these pictures which would affect Islamic belief. The need for such pictures is definitely greater than the “prints” on cloth which were exempted by the Prophet (peace be on him).
Pictures of people or animals which are not given respect but are kept as a luxury and high living, as, for example, when they cover a wall or the like are not allowed.
Making and acquiring drawings or paintings of trees, lakes, ships, mountains, and landscapes of this sort is permitted. However, if they distract from worship or lead toward extravagant living, they are disapproved.
Pictures on mugs etc. are not haram at all as long as your intention is not to be showy. Also visit
http://www.qaradawi.net/english/books/