Dashboard image on buttons

Hi everybody,
It's been a while that i struggle with inserting image into button on dashboard.
Images are stored on hubitat file manager
Each time i add a link to an image on a dashboard button to show it, it is cropped.
I would like the image to be adjusted to button sizeand maybebalign left or right ( if possible or course:-)

I actually put an image element with a picture over the button to work around the problem. The issue is that if you press on the image it will not press the button and itbis annoying.

Any suggestions


Which template are you attempting to use in the dashboard tile, is it actually a button template?

Yes a button template and I use the link image to

Some CSS will likely do the trick, but I'll need to work out what to use

Ok i am jot so good with css
That is the only hard point is to make a beautiful dashboard


Took a bit of investigation.... But I expect this is what you are after...

When viewing your dashboard, best in a PC / laptop browser....

  • Click the Settings Cog, commonly displayed in the top-right of the dashboard
  • Select Advanced, then CSS
  • In the text box displayed, include the following code, adjusting the tile number with your own:

#tile-2 { background-size: contain !important; }

Hope that helps...

1 Like

ok this is exactly what I was looking for thanks again and thanks for the app :slight_smile:
I just modified one of the button and it seems to work perfectly I will do all my dashboards this way

1 Like

Don't forget that you can include this in the Custom CSS section for a tile in the Simple CSS editor if you want. Aside from the convenience of including it in the one CSS file, if you copy this setting between any other buttons on the same dashboard they will also inherit this. If that makes sense....

THANK YOU!! I have struggled with this for a while but never asked the community for help.

1 Like

Took me a while to find it.... :slight_smile: Another one to add to the list for the editor...

I almost forgot these....

Something for me to get back to, but for anyone else interested, I expect this is the ticket...

1 Like