Ustadh Farid Dingle is asked if inappropriate passing thoughts about Allah are sinful.
Do demonic or comical thoughts about Allah take one out of the fold of Islam?
Actively bringing such an image or ideation to mind would be sinful. It merely coming across one’s mind has no ruling. Believing it would be disbelief.
Please also see Types of Thought, Blasphemy, and Sin.