In the name of Allah, the Most Merciful, the Most Compassionate The answer, with the help of the Sovereign, the Bestower. O Allah, grant guidance to the truth and correctness.
If a person offers prayer in front of a mirror, the prayer will be valid, because the reflection seen in a mirror is not considered an image (ṣūrah) in the Sharīʿah sense, due to which the ruling of makrūh taḥrīmī (prohibitively disliked) would apply.
However, if the mirror is placed in such a position in front of the worshipper that, while praying with humility and devotion, the reflection becomes visible when looking at the place of prostration during standing (qiyām), and this causes a disturbance in concentration and humility, then in such a case it is makrūh tanzīhī (mildly disliked).
Meaning:
The prayer will still be valid There will be no sin But avoiding this situation is better Therefore, it is preferable to refrain from offering prayer in front of a mirror.
It is stated in Fatawa Amjadiyyah:
If a mirror is in front, there is no dislike in the prayer, because the cause of dislike is an image, and that is not present here. And if the mirror were given the ruling of an image, then keeping a mirror itself would become impermissible like keeping pictures, whereas it is unanimously permissible. The reality is that there is no image at all; rather, due to the polish of the mirror, light rays reflect back to the face. In effect, a person is seeing himself, not that his image is contained within the mirror.
(Fatawa Amjadiyyah, Vol. 1, p. 184, Maktaba Razvia, Karachi)
It is stated in Waqar al-Fatawa:
Placing mirrors or anything similar in front of worshippers up to the height where their gaze reaches while praying with humility is disliked, because it diverts their attention. Therefore, such mirrors should be removed up to that height. The reflection seen in these mirrors does not carry the rulings of images; hence the prayer will not be makrūh taḥrīmī, but it will be makrūh tanzīhī.
(Waqar al-Fatawa, Vol. 2, p. 258, Bazm-e-Waqaruddin, Karachi)
And Allah knows best, and His Messenger knows best ﷺ