til

Today I Learned

View on GitHub

Customizing images in Github markdown files for dark mode

Today I came across this tweet which suggested that you could specify separate images for light/dark mode in markdown files on Github.

I went ahead and tried it out on Sentry’s repo and it worked great on Github.

Before

image

After

image

However, if you publish these markdown files anywhere else (like pypi) the image will most likely show up twice.

I’ve opened an issue for pypi to see if this can be resolved there.