The action of taking photos and videos of one another is sadly for the sake of showing others. I have seen with my own eyes on numerous occasions people pretending to recite the Qur’ān, simply for the sake of a photo. Many do the same with duʿā and various other postures of worship. These are, without us even realising, actions of riyā (ostentation) and kidhb (falsehood). These pictures are then used to gratify one’s pride upon return. Some will immediately send it to people through social media with captions like ‘Me praying Qur’an in Ḥaram Sharīf!’ etc. These are not only sinful activities, they are major sins.
The Messenger of Allāh ﷺ said to the Ṣaḥābah رضي الله عنهم, “The thing that I fear the most upon you is the lesser shirk.” They asked: “What is the lesser shirk O Messenger of Allāh?” He ﷺ replied: “Riyā. Allah will say to them (i.e. people with riyā] on the Day of Judgement, when others would be rewarded for their actions: ‘Go to the people to whom you were showing your actions and see if you can find any reward with them.’” (Ahmad)
This is such a detrimental sin that it is named the lesser shirk, as all worship should be only to please Allāh the Creator, not the creation. If someone was actually worshipping in the Ḥaramayn and suddenly decided to have their photo taken, then this would constitute riyā, However, if someone was not engaged in any worship and for the sake of a photo or film pretends to worship in order to show others, then such an action is an apparent lie as well as riyā. May Allah save us.
[How to Observe the Sanctity of the Ḥaramayn Sharīfayn by Ḥazrat Maulānā Muhammad Saleem Dhorat حفظه الله Pg.18]