Handle transparent images on Dark Theme

When viewing on Dark Theme, transparent images don’t work so well.
Is there markdown to set a background colour for an image or another way to handle?

1 Like

This doesn’t really have anything to do with themes. Get an image that has proper transparency defined (alpha-blending, not hard coded) or swap out images per theme.

The Discourse logo, for example, has to be manually inverted to work on a dark theme, the black converted to white but the rest of the colors left alone.

If you’re talking about images in posts, you can apply a background color via CSS in your theme settings.
For example:

.cooked img {
    background-color: white;
}

But that will apply to every images.

2 Likes