Short answer
Your prayer is valid, but praying facing a mirror is disliked (makruh) because seeing yourself and the movement in it distracts you from the prayer. Cover the mirror, move it, or stand somewhere else. It is not haram, and a reflection is not treated like a picture.
A mirror in front of the person praying does not affect validity. Hanafi muftis consider it makruh because it distracts and draws attention to oneself, in line with the rule that anything in front of you that diverts attention from prayer is disliked. A reflection is not counted as an image.
The four schools agree on this.
Explanation
Once the Prophet ﷺ prayed in a cloak with a bold pattern, and afterwards he gave it away, saying it had distracted him from his prayer. From this the scholars took a general rule: anything in front of you that pulls your attention away is disliked in prayer. A mirror, where you watch yourself bow and prostrate, is a clear example.
It is not haram, and the prayer does not need repeating. A reflection is not a picture, so the stricter rules about praying towards images do not apply. The issue is focus and humility (khushu), and seeing yourself in a mirror works against both. The four schools agree in substance.
- Wardrobe with mirror doors: pray facing another way if the qibla allows, or hang a cloth over the mirror.
- Mirror to the side: not a problem if you are not looking at it.
- Hotel rooms: rooms often have a mirror on the qibla wall; drape a towel over it.
- TV or dark glass: a reflective screen in front of you is better covered or avoided for the same reason.
For where to look in prayer, see should you close your eyes when praying. For pictures, see praying with a picture on your clothes.
The evidence
Quran, Surah Al-Muminoon 23:1-2
بِسْمِ ٱللَّهِ ٱلرَّحْمَٰنِ ٱلرَّحِيمِ قَدْ أَفْلَحَ ٱلْمُؤْمِنُونَ ﴿١﴾ ٱلَّذِينَ هُمْ فِى صَلَاتِهِمْ خَٰشِعُونَ ﴿٢﴾
Certainly will the believers have succeeded: They who are during their prayer humbly submissive
Humility and focus are the aim, so distractions are avoided.
Sahih al-Bukhari 373
Sahih... فإنها ألهتني آنفا عن صلاتي ...
"It distracted me just now from my prayer."
Things in front of you that distract you in prayer are removed.
Where the ruling is recorded
- Radd al-Muhtar (Ibn Abidin), Kitab al-Salah, chapter on what is disliked in prayer. Praying with something in front of you that distracts the heart is disliked.
Checked by our team. For a more accurate answer to your own situation, consult a scholar. Quran translation by Sahih International. Hadith Arabic from the standard editions of the six books and the Muwatta, with gradings as recorded there; the English is our own rendering. Spotted a mistake? Tell us.