Auto-adaptive images [for dark / light theme]

I adapted it into a minimal CSS snippet.
The original didn’t work in preview mode, and this does.

.theme-dark img[alt$="invert_dark"] {
  filter: invert(1);
}

.theme-light img[alt$="#invert_light"] {
  filter: invert(1);
}

Usage:

![[dark_image.png#invert_dark]]
![[light_image.png#invert_light]]
5 Likes