How can I remove the filter on images in callouts

What I’m trying to do

In the reading view, obsidian renders images and videos with a filter that shows the note’s background on darker parts of the image. I’m not sure if this is a bug or a feature, but I want to remove it because in darker images, it ruins the contrast, and in notes with custom backgrounds, it has even worse effects. Everything displays properly in editing view

here’s a screenshot of what I mean:

and what happens when you have a background image on your note:

Things I have tried

I made sure this wasn’t the result of one of the plugins or css snippets i have enabled on my main vault by creating a test vault, and got the same result

I tried searching “images in callouts” in the forums, and various other things on the internet in the past (this has been an issue for me for a while) and saw nothing about this

I tried ctrl + shift + I and looked closely at the css code for images in callouts. I dont remember everything I did, but I tried writing various bits of css in a snippet relating to the background color, the rendering of the image, filters, anything that might possibly affect it. Nothing seemed to work, and nothing in the inspect window even really looked like it could relate to this

I checked options just in case there was some kind of setting related to this, and of course found nothing

My vault is callout heavy, and I use reading view a lot because certain parts of my vault don’t display properly in editing view, so for now I have to choose to either put an image in the callout and deal with the filter, or put the image below the callout, which disrupts the style of my vault

.callout {
  mix-blend-mode: normal;

Should work, anyway it is mix-blend-mode


In the default theme there’s a custom property defined for light and dark modes that you could also use.

The defaults:
light mode: --highlight-mix-blend-mode: darken;
dark mode: --highlight-mix-blend-mode: lighten;

.theme-dark {
    --highlight-mix-blend-mode: unset;

But the snippet from Jopp looks fine in both light and dark modes with the handful of images I tried.

1 Like

Wow, thank you both so much. Works perfectly, and now that I know about it I can use the mix-blend-mode property if I ever actually do want an effect like that somewhere

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.