Sunan Ibn Majah Book 5, Hadith 159
“The Messenger of Allah (ﷺ)
said: ‘Does not the one who raises his head before the Imam fear
that
Allah may turn his head into the head of a donkey?’”
“The Prophet (ﷺ) used to teach us not to bow or prostrate before the Imam; when he says the Takbir then say the Takbir, and when he prostrates, you should prostrate.”
“The Messenger of Allah (ﷺ) said: ‘I have gained weight, so when I bow, then bow, and when I stand up, then stand up, and when I prostrate, then prostrate. I should never find anyone preceding me in bowing or prostration.’”