Icons were being inverted in dark mode based on whether the string svg
appeared anywhere in the icon URL. This caused PNG icons to randomly
get inverted if their base64 encoding happened to contain "svg" by coincidence.
Solution
Added configurable icon_dark_invert frontmatter property for actions
Changed logic to:
Use explicit icon_dark_invert: true/false if defined in docstring
Fall back to checking actual MIME type (startsWith('data:image/svg'))
instead of .includes('svg')
Usage
"""
title: Export to PDF
icon_url: data:image/png;base64,...
icon_dark_invert: false
"""
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
Note
Deleting the CLA section will lead to immediate closure of your PR and it will not be merged in.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/open-webui/open-webui/pull/21272
**Author:** [@Classic298](https://github.com/Classic298)
**Created:** 2/9/2026
**Status:** ❌ Closed
**Base:** `dev` ← **Head:** `patch-4`
---
### 📝 Commits (4)
- [`2f0784f`](https://github.com/open-webui/open-webui/commit/2f0784f8f151a3f094ba2cd9ab686254b47f0f00) Update ResponseMessage.svelte
- [`7a1afdd`](https://github.com/open-webui/open-webui/commit/7a1afdde95e5e8887c9fbe4d9a290092238ef033) Update ResponseMessage.svelte
- [`a51431e`](https://github.com/open-webui/open-webui/commit/a51431e0fb09d275dc2b1e8871c9ad8338a79b6e) Update ResponseMessage.svelte
- [`3790084`](https://github.com/open-webui/open-webui/commit/37900845c637f7efcb6f0ecede519474796499b4) Update ResponseMessage.svelte
### 📊 Changes
**1 file changed** (+3 additions, -1 deletions)
<details>
<summary>View changed files</summary>
📝 `src/lib/components/chat/Messages/ResponseMessage.svelte` (+3 -1)
</details>
### 📄 Description
### Problem
Icons were being inverted in dark mode based on whether the string `svg`
appeared *anywhere* in the icon URL. This caused PNG icons to randomly
get inverted if their base64 encoding happened to contain "svg" by coincidence.
### Solution
- Added configurable `icon_dark_invert` frontmatter property for actions
- Changed logic to:
1. Use explicit `icon_dark_invert: true/false` if defined in docstring
2. Fall back to checking actual MIME type (`startsWith('data:image/svg')`)
instead of `.includes('svg')`
### Usage
```python
"""
title: Export to PDF
icon_url: data:image/png;base64,...
icon_dark_invert: false
"""
```
### Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](https://github.com/open-webui/open-webui/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms.
> [!NOTE]
> Deleting the CLA section will lead to immediate closure of your PR and it will not be merged in.
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/21272
Author: @Classic298
Created: 2/9/2026
Status: ❌ Closed
Base:
dev← Head:patch-4📝 Commits (4)
2f0784fUpdate ResponseMessage.svelte7a1afddUpdate ResponseMessage.sveltea51431eUpdate ResponseMessage.svelte3790084Update ResponseMessage.svelte📊 Changes
1 file changed (+3 additions, -1 deletions)
View changed files
📝
src/lib/components/chat/Messages/ResponseMessage.svelte(+3 -1)📄 Description
Problem
Icons were being inverted in dark mode based on whether the string
svgappeared anywhere in the icon URL. This caused PNG icons to randomly
get inverted if their base64 encoding happened to contain "svg" by coincidence.
Solution
icon_dark_invertfrontmatter property for actionsicon_dark_invert: true/falseif defined in docstringstartsWith('data:image/svg'))instead of
.includes('svg')Usage
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.