Alexander Burt, 56, admitted he previously hounded the woman with unwanted messages prior to sending an image on April 16, 2020 that was grossly offensive or of an indecent, obscene or menacing character.
Burt, of 7 Thornbridge Road, also pleaded guilty to having an air weapon within his home on April 21 last year, despite not possessing an air weapon certificate.
Speaking at Falkirk Sheriff Court on Thursday, defence solicitor Dick Sandeman said his client had experienced “difficulties” with alcohol.
Mr Sandeman said: “It’s not exactly a glowing report, perhaps quite the reverse.
“It shows the difficulties he’s having with alcohol. He has regular contact with his partner.
“She’s supportive and trying to make contact with the social worker to see what can be done. She lives elsewhere.”
The court was told Burt has since been referred to an inclusion programme for “those with chronic misuse difficulties” and “understands the significance and seriousness of it”.
The solicitor asked for the case to be continued, in line with a recommendation made by a social worker.
However, Sheriff Derek Hamilton said he was not convinced that was the best option to take.
Addressing Burt, Sheriff Hamilton added: “I thought from day one you’ve not appreciated the seriousness of this offence.
“The report in August last year indicated you had no wish to change your drinking habits or your life choices. I was prepared to look at this matter further and order a psychiatric report but that said you didn't engage well.
“A separate report left you in no doubt you had to comply with the terms of any order imposed. You haven’t complied with that.
“We’re now some seven months on from the start of the sentencing process and there’s been no change in your attitude to this.
“I’m now left with no alternative but to revoke the community payback order and impose a custodial sentence for six months.
“It’s unfortunate it’s come to this but you’ve shown no inclination to deal with this matter appropriately.”