-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Improve device icon serving #25299
Conversation
Did you give this a try on Windows? Since it's dealing with file system. |
I don't have a Windows machine to test on but the tests found an issue which I fixed in e46c2b6 |
Added a migration to automatically convert base64 icons to pngs and prohibited base64 in the |
Tested it on Windows, image showed up without problem. zigbee2mqtt/lib/util/settings.schema.json Lines 804 to 808 in 62e18a6
This description needs updating. |
@Nerivec good point, I forgot that URLs are should also be supported! |
thanks for the feedback, created #25364 |
Currently device icons are stores as base64 string inside the device options. This significantly increases the size of the
configuration.yaml
, especially when done for all devices (which is what the localise device images on the frontend does). This can even lead to Zigbee2MQTT failing to start (e.g. #25259). With this PR device icons are now saved in thedevice_icons
directory, theconfiguration.yaml
only contains the reference to the image, e.g.:Note that images must be in the
device_icons
directory!Fixes: #25259, nurikk/zigbee2mqtt-frontend#2100, nurikk/zigbee2mqtt-frontend#1477
TODO: