Load icons from conf/icons in PaperUI

I want to have the ability to change the used icons in PaperUI via a simple file replacement in the conf-folder. I’ve read here Info to OH2 that you can simply put image files in conf/icons. But how do I use them in the PaperUI. Especially with Javascript.
For example: I use the file background.png" to display an image on the UI. To change this image, the only thing I have to do is to change the file in conf/icons.

Can you give me some hints or example code to retrieve the images in JS. Thanks :wink:

The Paper UI does not show any icons, so there is also no need to replace them :open_mouth:
User icons are meant to be used for sitemap widgets and these are only supported in the normal UIs, such as the Classic UI and the Android & iOS apps.

Hmm, okay. I have customized the PaperUI and I do have some special Icons used in the UI.
Is there any possibility to load an image/icon in the PaperUI (JS or HTML) from a folder like conf or something? Actually I do pack a folder named img in the web-folder in the PaperUI jar. There I can place all my images and use them in the ui. But to change those images, I have to change the jar, which isn’t the best solution. Thanks

What you can do is to build yourself a version of the org.openhab.ui.paperui fragment, which overlays the original files - simply put your custom stuff into https://github.com/openhab/openhab2/tree/master/addons/ui/org.openhab.ui.paperui/patch/web.

Hi again :wink:
I already do this :wink: But is there an option to replace image-files without changing the paperUI-Jar?

No. If there is a real use case, the Paper UI would have to be adapted to make certain things customizable.