Skip to content

A self-hosted dashboard that puts all your feeds in one place

add .webp as overwrite option for icons + docs

gan-of-culture6045f4ec787e
diff --git a/docs/configuration.md b/docs/configuration.md
index 174de83..97fa787 100644
--- a/docs/configuration.md
+++ b/docs/configuration.md
@@ -210,6 +210,12 @@ icon: auto-invert sh:glance-dark # with a selfh.st icon
This expects the icon to be black and will automatically invert it to white when using a dark theme.
+If there is no `.svg` version available for a `selfh.st` or `Dashboard` icon, then you can add the image extension of the format you wish to use.
+```yaml
+icon: sh:glance.png # use the .png version of the icon
+icon: sh:glance.webp # use the .webp version of the icon
+```
+
## Config schema
For property descriptions, validation and autocompletion of the config within your IDE, @not-first has kindly created a [schema](https://github.com/not-first/glance-schema). Massive thanks to them for this, go check it out and give them a star!
diff --git a/internal/glance/config-fields.go b/internal/glance/config-fields.go
index 2eec599..70a3e74 100644
--- a/internal/glance/config-fields.go
+++ b/internal/glance/config-fields.go
@@ -155,7 +155,7 @@ func newCustomIconField(value string) customIconField {
basename = icon
}
- if ext != "svg" && ext != "png" {
+ if ext != "svg" && ext != "png" && ext != "webp" {
ext = "svg"
}