Birmingham Ladywood MP Ms Mahmood’s page instead showed a picture of Rushanara Ali, who represents Bethnal Green and Bow.
Responding to the mix-up, Ms Ali said: “These things happen. Sometimes I get confused between bald white male Cabinet ministers.
“We shouldn’t take these things too seriously.”
After being alerted to the mix-up by PA, parliamentary authorities quickly removed the photograph of Ms Ali from Ms Mahmood’s profile, which currently does not display a picture.
A disclaimer on the webpage declares “this is a test website, so may be inaccurate”, but there did not appear to be any other mistakes.
Ms Mahmood and Ms Ali, alongside Yasmin Qureshi, became Britain’s first ever female Muslim MPs in 2010.
A House of Commons spokesman said: “As can happen with beta websites which are still in development, a technical error led to an incorrect photo of an MP being uploaded.
“The error was promptly identified and rectified. The information and photos we hold about MPs on our existing website is up to date and correct.”
Celebrity photographer Chris McAndrew, who has shot the likes of rapper Snoop Dogg and actor Benedict Cumberbatch, was commissioned to take the portraits as part of Parliament’s drive to develop its online content strategy.
Blogging about the project, Parliament’s editor-in-chief Carrie Barclay said she wanted “to give greater emphasis to the human side of this big beast called Parliament”.
“I also want to find a visual style that represents the formidable history of this amazing place and its people,” she said.
“Something that stock images and degraded jpegs can’t do.
“I want our users to have a more emotional response to the images they see online and to associate a specific style and treatment with our broader work.”
The portraits are designed to be used under a Creative Commons licence to allow their free distribution from the beta website and Flickr, with the aim of them appearing more widely on websites like Wikipedia.