Facebook is asking users to send the company naked photos and videos of themselves so that it can block the images if they are later uploaded as revenge porn.

A trial of the feature in Australia asks people worried that their intimate pictures might be posted by an ex partner to provide the images to Facebook, so that it knows to prevent them being uploaded in future. The trial is due to spread to the UK, US and Canada.

Facebook's software would create a "hash" - a digital fingerprint of the photo - so it can be recognised the next time it is uploaded and automatically blocked. It hopes that pre-emptive action will prove better than deleting images only after they are reported, by which time the damage may have been done.

Facebook bans explicit images, and revenge porn can result in a prison sentence of up to two years in the UK, but it is still a major problem on the social network. Leaked documents this year revealed that the company sees 54,000 cases a month.

Julie Inman Grant, Australia's e-Safety commissioner, said Facebook would not be permanently storing the images, but only the hashes, which are capable of blocking further attempts to upload the pictures but can not be decoded to produce the images.