Specify theme context for images in Markdown - GitHub Changelog (original) (raw)
Users can now specify the theme an image is displayed for in Markdown. Appending #gh-dark-mode-only
or #gh-light-mode-only
to the end of an image url will define whether it's only shown to viewers using a light or a dark GitHub theme. For example:
The GitHub logo in the above screenshots uses the following Markdown to specify the theme context:

Subscribe to our developer newsletter
Discover tips, technical guides, and best practices in our biweekly newsletter just for devs.