The World Federation One Stop Fiqh

Ruling 886

It is unlawful to make impure a mosque’s floor, ceiling, roof, and inside walls, as well as fixtures and fittings that are deemed to be part of the building, such as doors and windows. 

Whoever finds out that it has become impure must immediately purify it. The recommended precaution is that the outside walls of the mosque should not be made impure either, but if they become impure, it is not necessary to purify them. However, if making the outside walls of a mosque impure amounts to disrespecting the mosque, it would, of course, be unlawful and make it necessary to purify them to the extent that it would no longer be considered disrespectful.