resoai / TileBoard

A simple yet highly configurable Dashboard for HomeAssistant
MIT License
1.63k stars 278 forks source link

"Image" tile no longer working #761

Closed christophebaraer closed 3 years ago

christophebaraer commented 3 years ago

I used Tileboard (pre-1.0.0) with the "Image" title to display a QR code with details about my guest network and recently updated to the latest version to see the recent improvements the community has added.

While the update went smooth, I noticed that the image tile was no longer displaying my image. See attached image with details. It looks the details from the config.js with the path to the image isn't fetch properly.

Screenshot 2021-08-27 at 16 03 15
rchl commented 3 years ago

How does the code of your tile look like?

christophebaraer commented 3 years ago

Thanks @rchl for the answer. The config hasn't changed from my side :

{
                title: 'Guest network',
                width: 1,
                height: 3,
                items: [{
                        position: [0, 0],
                        type: TYPES.IMAGE,
                        id: {},
                        imageURL: '../unifi++.png'
                    }]
            }

but it looks like the path to the image isn't properly filled in the HTML as seen below.

element.style {
    background-image: url((unknown));
}

Replacing the CSS with the path to the image works just fine.

element.style {
    background-image: url(unifi++.png);
}
rchl commented 3 years ago

An url property is expected, not imageURL.

Not sure if that has changed and whether it was on purpose...

christophebaraer commented 3 years ago

Thanks @rchl 👍👍

I also noticed that when looking into main.js to compare a pre-1.0.0 previous version with the latest one and also noticed the change from imageURL to url. It's now working like a charm! Closing this issue.