We can wrap text in ==text== to highlight it.
I’m trying to make a CSS snippet that can highlight an image ====
It seems like you’re working in live-preview, and with the code you’ve listed there the code mirror engine simply removes the highlighting around the image, so it doesn’t look like you’re able to highlight an image at all using this syntax. (That is beside something with a .cm-line having an <img> within, and I don’t think that’s unique enough for reliable CSS selection)
In reading view, the highlight elements are kept, as you then get a <mark><img ... ></mark> layout, so there you should be able to do some CSS styling to it.
To get something similar in live-preview, I’m not sure what you need to.
I often have an embedded link already so this doesn’t work. And I don’t think this can remove the highlight.
May I ask the meaning of the css class “.cm-scroller” and “.cm-editor”?