markup
markup copied to clipboard
Adding links to images that can change based on the theme
I would like to implement an image that changes according to the GitHub theme and has an embedded link. Is there a way to achieve this? Like the example below:
<picture align="center">
<source media="(prefers-color-scheme: dark)" srcset=".github/preview.png">
<source media="(prefers-color-scheme: light)" srcset=".github/preview-light.png">
<a href="LINK-HERE">
<img alt="project" src=".github/preview.png">
</a>
</picture>