We have only the King’s report, but even he doesn’t say she’s going to blackmail him (in fact, she refuses money) - she intends to send the photo to the king’s intended. In response, the King has sent burglars to invade her home, bribed railway workers to steal her luggage, and sent muggers to waylay her.
Irene’s letter says:
“We both thought the best resource was flight, when pursued by so formidable an antagonist; so you will find the nest empty when you call to-morrow. As to the photograph, your client may rest in peace. I love and am loved by a better man than he. The King may do what he will without hindrance from one whom he has cruelly wronged. I keep it only to safeguard myself, and to preserve a weapon which will always secure me from any steps which he might take in the future."
At worst, Irene is deeply jealous and intends to ruin the King’s reputation - but the person who is having a hard time getting over the relationship is the King
“Irene Adler is married,” remarked Holmes.
“Married! When?”
“Yesterday.”
“But to whom?”
“To an English lawyer named Norton.”
“But she could not love him.”
“I am in hopes that she does.”
“And why in hopes?”
“Because it would spare your Majesty all fear of future annoyance. If the lady loves her husband, she does not love your Majesty. If she does not love your Majesty, there is no reason why she should interfere with your Majesty’s plan.”
“It is true. And yet—! Well! I wish she had been of my own station! What a queen she would have made!” He relapsed into a moody silence, which was not broken until we drew up in Serpentine Avenue.
I think it’s reasonable for Irene to be worried about the King’s potential actions and thus to not want to give up the photo.