Legislation making it an offence to share "revenge porn" is set to be debated at Holyrood.

The Scottish Government's Abusive Behaviour and Sexual Harm Bill aims to increase the powers of police, prosecutors and courts to take action against perpetrators of domestic abuse, harassment and sexual offences.

The Bill also includes a requirement for judges to give juries specific directions when dealing with sexual offence cases that are designed to improve juries' understanding of sexual violence and domestic abuse.

This could include explaining why why a victim might not report or resist an offence at the time it was committed.

A new statutory domestic abuse aggravator will also be introduced to ensure courts take domestic abuse into account when sentencing an offender.

Justice secretary Michael Matheson said: "The bold proposals parliament is debating today will improve the way the justice system responds to abusive behaviour, holding perpetrators to account for their actions and improving public safety.

"As well as sending a strong message that domestic abuse and harassment are appalling crimes which will not be tolerated, this Bill will also remove some of the current barriers to justice by improving understanding of domestic abuse and sexual harm, something we know is lacking in the current system.

"We are also continuing to modernise law in Scotland and to make sure our legislation best fits the needs of a 21st century Scotland, which is why we are creating a new offence of sharing intimate images without consent, so-called revenge porn, reflecting changing technology.

"At a time when victims of sexual offences have increasing confidence in reporting historic incidents to the police knowing they will be effectively investigated, our proposals on new jury directions will also make a real difference in ensuring juries approach court evidence in an informed and balanced way."