• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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 Sep 13, 2016, 11:04 AM

    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 Sep 13, 2016, 7:08 PM

      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 Sep 15, 2016, 2:25 AM Reply Quote 1
      • C Offline
        cowboysdude Module Developer
        last edited by Sep 15, 2016, 12:10 AM

        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 Sep 15, 2016, 2:25 AM

          @GHLasse Thank you. I will test it later.

          1 Reply Last reply Reply Quote 1
          • 1 / 1
          1 / 1
          • First post
            3/4
            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