Read the statement by Michael Teeuw here.
Trouble getting Background Image to Show
-
@ankonaskiff17 so u can turn off things with a click in front. so disable the background color
-
@sdetweil I’ve wrestled with this all morning and exhausted every combination I could imagine, I decided to try sticking a color in as shown below. Not sure if anything can be inferred if it will accept a background color but not a background image. I am ignorant of the vagaries of js but is it possible that
background: var(--color-background);in is locking me i n to only color options since the default is set in:root { --background-color #000 }body { background: red; } -
@ankonaskiff17 possibly… disable it in the dev window… uncheck it… right side, near the bottom (that is closest to main.css while top is closest to latest css.
-
@ankonaskiff17 so I added a body with a background image, using the MM web server in my custom.css
body { background-image: url("http://localhost:8090/modules/images/testimage.jpg") }and then started MM
and got

u can see the two body clauses on the right, top is custom.css (if u hover over the name it tells u where it came from)
-
then I added a root entry to custom.css
root: { background-color: black; } html { /* cursor: none; */ } body { background-image: url("http://localhost:8090/modules/images/testimage.jpg") }and got

notice border around pic
then turned it off in the dev window

border gone
-
same results with
root: { --background-color: black; } html { /* cursor: none; */ } body { background-image: url("http://localhost:8090/modules/images/testimage.jpg") } -
using file:// does NOT work
body { background-image: url("file:///home/sam/MagicMirror/modules/images/testimage.jpg") }even tho it works in chrome
-
@sdetweil localhost is what shows in developer window? You show 8090 vs my 8080
-
@ankonaskiff17 localhost, cause I am on the same machine as MM is running
and port 8090 cause I have another app using 8080 …
-
@sdetweil I am getting a
Not allowed to load local resource
I thought the image might have not been quite right so copied it fresh and did renaming in terminal but really sure what is going on.I’m a dummy. I do think the image file was messed up as I was getting file not found errors before I reloaded & renamed file in terminal vs in the Pi version of file manager. Windows habits die hard.
After I did that I started getting the local resource message. I had been doing this through VNC on my laptop but pulled big screen tv over where I could read it, deleted the localhost address from file that I did in VNC and redid the exact same address via Pi directly and its all good now.
Shame on me but is there some rule of thumb about what you can and can’t do remotely. I have built 5 of these things with no issues using VNC until this background sreen issue. Even on this one, I’ve loaded multiple modules, jumbo sized fonts etc. -
where are u doing this? on pi, or remote(pc desktop)
what is the address: in config.js?
-
@sdetweil See my wordy edit above
-
@ankonaskiff17 address: and ipWhitelist are not in any of your posts above
i set address: my machine address 192.168.2.106
and it failed with a macthing URLI still had ipWhitelist set as default, which prevented connect from other than localhost
changed to ipWhitelist:[]
and ip address url works and from a different machine… -
@sdetweil So I need to put laptop IP in whitelist what I think I understand you to be saying
-
@ankonaskiff17 I always start with NO ipWhitelist… get it working then fix the filter
debug ONE thing at a time…
-
@sdetweil Wasn’t in vain. Thanks for the help. Image pretty washed out in photo but have some opacity and gradient and looks better in person.

-
@ankonaskiff17 Nice… I use an updated MMM-ImagesPhotos to show my photos from my server machine, images on an external 5tb drive.
https://github.com/sdetweil/MMM-ImagesPhotosand I have a module that allows you to scan a QR from your phone and upload a pic to whatever storage area u want , then the image displayer can use it…
-
@sdetweil I have a ton of pictures from rocket launches to elk in Rockies. I somehow or another had found Dak Board and piddled with it but it was a subscription based system that MagicMirror puts to shame.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login