Skip to content

v1.1.0

Choose a tag to compare

@Effeilo Effeilo released this 02 Jul 18:08
· 5 commits to main since this release

[1.1.0] – 2025-07-02

✨ Added

  • Support for theme-based image swapping in any framework (React, Vue, Angular, HTML):
    • Dynamically replaces <img class="has-dark"> sources based on the current theme.
    • Works automatically using a -dark filename convention (e.g. logo.webp → logo-dark.webp).
    • Also supports manual override with data-src-light and data-src-dark attributes for full control.

🛠 Improved

  • Web Component now handles images inserted dynamically (e.g. via JSX, Vue templates, Angular bindings).
  • The updateImagesByTheme() and updateThemeImages() utilities work together:
    • updateImagesByTheme() applies filename-based switching for simple use cases.
    • updateThemeImages() enables fine-grained control via explicit attributes.