Smartphone photography is tolerated in outer areas but restricted during namazs, prohibited in the Rawdah, and professional cameras and drones are banned.
Photography rules inside the two holy camis have evolved. Currently, casual smartphone photography is tolerated in outer courtyards and non-namaz areas. Taking a photo of the Kabe from upper floors is common. However, during active namaz times, photography is discouraged.
Restrictions: professional cameras and tripods are not permitted. The Rawdah in Medine strictly prohibits photography. Video recording of other worshippers without consent is prohibited. Drone photography is absolutely prohibited and a serious legal offense.
From an etiquette perspective, scholars advise moderation. The primary purpose is spiritual devotion, not content creation. Take a few meaningful photos during non-namaz times and then put your phone away to focus on worship.