MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    local pictures, displayed on the mirror.

    Scheduled Pinned Locked Moved Troubleshooting
    4 Posts 3 Posters 2.4k Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D Offline
      dominic
      last edited by

      Hello guys.
      Is there a modul, with i can load pictures (local path) from my raspbbery to the mirror?
      If not, can someone help me pleas? :)
      Thanks

      1 Reply Last reply Reply Quote 0
      • G Offline
        GHLasse
        last edited by

        On first thought this should be not too difficult to achieve.

        I would try something like

        getDom: function() {
            var wrapper = document.createElement("div");
            if (!this.config.imageurl) {
                wrapper.innerHTML = "ERROR";
            }else{
                var pic = document.createElement("img");
                if(!this.config.showColor){
                    pic.className = "bw";
                }
                pic.src = this.config.imageurl;
                wrapper.appendChild(pic);
            }
            return wrapper;
        }
        

        and then use

        defaults: {
            imageurl: '',
            showColor: false
        }
        

        where the imageurl should default to the modules public directory if no “http” address is specified.

        in the css

        .MODULENAME img.bw {
          -webkit-filter: grayscale(100%);
        }
        

        would allow to convert to grayscale to fit in with the general design.

        Hope that gets you started :-)

        D 1 Reply Last reply Reply Quote 1
        • cowboysdudeC Offline
          cowboysdude Module Developer
          last edited by

          Yes having a module like that would really be cool!! I could put my daughter’s pictures there… Never can see enough of my kid! :)

          1 Reply Last reply Reply Quote 0
          • D Offline
            dominic @GHLasse
            last edited by

            @GHLasse Thank you. I will test it later.

            1 Reply Last reply Reply Quote 1
            • 1 / 1
            • First post
              Last post
            Enjoying MagicMirror? Please consider a donation!
            MagicMirror created by Michael Teeuw.
            Forum managed by Sam, technical setup by Karsten.
            This forum is using NodeBB as its core | Contributors
            Contact | Privacy Policy