From Sahih Bukhari (Hadith 691):
Narrated Abu Huraira:The Prophet (ﷺ) said, "Isn't he who raises his head before the Imam afraid that Allah may transform his head into that of a donkey or his figure (face) into that of a donkey?
Reference: Bukhari 691