France’s equalities minister has said social networks must do more to ensure illegal content is immediately taken down, after a video of an alleged rape was shared widely on Twitter.

Two 16-year-old boys have been charged with the rape of a teenage girl and remanded in custody outside Paris.

When the video of the alleged attack was flagged late last week to French government services dealing with illegal content online, the police posted a message on Twitter asking the public not to share the images.

The boys were quickly identified online. One voluntarily went to a police station in the Essonne area, south of Paris, and the other was arrested shortly after. They were questioned by police over the weekend and charged with rape as well as making and sharing violent and degrading images.

“They are teenagers but that is not an excuse,” the equalities minister, Marlène Schiappa, told Le Parisien newspaper. “Respect for women must apply to all ages and all parts of the republic.”

Schiappa denounced what she called a “despicable video” and warned that social networks were not doing enough to deal with such content. “As soon as I heard about this, I immediately contacted Twitter to get this taken down,” she said. But she added that even after she had contacted Twitter, copies of the images were still circulating. “That social network is not up to it, criminals know that, that’s why they use it.”

She said the French government had taken steps to make sharing such content punishable by the law.

In a statement to the Guardian on Monday, Twitter said: “Threats of violence, objectifying people in a sexually explicit manner, or otherwise engaging in sexual misconduct, are in violation of the Twitter rules and have no place on the service. We have a zero-tolerance approach to this type of content and we take action as soon as we are made aware of it.”