Sayyiduna Abdullah (may Allah be pleased with him) says: Does the one who raises his head before the imam consider (himself) safe from his head being changed into the head of a dog? People will either desist from raising their gaze toward the sky, or their sight will be snatched away.
Al-Tabarani recorded it in al-Mu'jam al-Kabir with several chains, the narrators of some of which are thiqat (trustworthy).
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب الصلاة / 2420