Skip to content

Specify theme context for images in Markdown GA

You can now specify whether to display images for light or dark themes in Markdown, using the HTML <picture> element in combination with the prefers-color-scheme media feature.

For example:

  <source media="(prefers-color-scheme: dark)" srcset="">
  <img alt="Shows an illustrated sun in light color mode and a moon with stars in dark color mode." src="">

GitHub Pages now builds with GitHub Actions by default across all repositories.

For more details, see this blog post.

See more