Post

Ever wanted to display different images in your GitHub READMEs depending on light or dark mode? 🌓 Check out the steps in this thread! 👇 #opensource #oss #floss #foss #github

You can append "#gh-light-mode-only" or "#gh-dark-mode-only" to your image URLs in Markdown. This will ensure only one image is displayed, depending on whether the viewer is in light or dark mode.

But if you need this inside HTML elements, you'll have to create a link that includes the "#gh-light-mode-only" or "#gh-dark-mode-only" anchor tags.

0 reposts1 like