The photographer in "A Scandal in Bohemia" remains anonymous, but the photograph he took stands at the center of a potential scandal for none other than the King of Bohemia. The unnamed photographer captured a shot of the king with Irene Adler. This would not be a problem if the king and Irene had not been rather intimate, but the king wishes to announce his engagement to a young lady of a noble and extremely strict family, and if word got out about his relationship with Irene, the engagement would be called off in an instant. Scandal would reign instead of the king.
What's more, Irene Adler has threatened to send that very photograph to the King's fiancée the moment their engagement is officially announced. She believes that the king has wronged her, and she wouldn't mind taking a bit of revenge on him or at the very least making him extremely nervous. The king is positive that Irene will do anything to prevent him from marrying another woman.
The king, therefore, engages the services of Sherlock Holmes to retrieve the incriminating photograph, but for once in his life, Sherlock Holmes fails to do what he sets out to do. He does not get the photograph. He succeeds in discovering where it is located, but when he goes back to get it, he finds another photograph and a note in its place. Irene Adler has married and no longer cares what the king does. She will keep the photograph of them together as an insurance policy, but she vows not to use it. The king believes that her word is good. Holmes keeps the photograph of her that Irene left in the hiding place, and he refers to Irene Adler as "the woman" forever after.