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.

    MMM-ImagesPhotos - Show images from a directory

    Scheduled Pinned Locked Moved Utilities
    85 Posts 26 Posters 113.3k Views 26 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.
    • dasbooterD Offline
      dasbooter @roramirez
      last edited by

      Thanks a bunch for this module. Seems to work great maybe some pics show up more often than others. Curious what formats it accepts?

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

        I’m going to think it accepts all formats…nothing is specified…

        @markus220 did you check the developer console to see if there are errors? Did you use the right dir format?

        1 Reply Last reply Reply Quote 0
        • P Offline
          Peter
          last edited by

          Very nice module.
          I have about 2000 pictures in the Upload directory, all resized to 100 kb.
          But the module only shows about 50 of them.
          Why does it not show the other pictures?
          Any idea?
          Peter

          N 1 Reply Last reply Reply Quote 0
          • N Offline
            ninjabreadman @Peter
            last edited by

            @Peter

            What does your config look like? Where are your images? What type(s) are they? I tried making a folder with 100 files (well over 50), but that seemed to work fine.

            Do you have the photos in multiple folders/paths? If so, have you tried removing the path of the photos that work to leave the other paths (to determine they work)? Have you tried adding treatAllPathsAsOne: true to your module config?

            What is the content of photos.txt if you type curl http://localhost:8080/MMM-ImagesPhotos/photos > photos.txt into a separate console (while MM is running)?

            Don’t post it all here, but if there are not several thousand entries, the module is not seeing all of your files (but you knew that).

            Problem with config or JavaScript? Copy/paste it into JSHint.
            Check out the detailed walkthroughs on install, config, modules, etc.

            P 1 Reply Last reply Reply Quote 0
            • P Offline
              Peter @ninjabreadman
              last edited by

              @ninjabreadman solved.
              I did something stupid.
              I had 70 pictures (5mb each) and it caused trouble, so I resized them to 100kb.
              But I also have 2 sd cards …
              I put 2000 pictures (100kb) on one card and left the 70 (5mb) pictures on the other card.
              And then I changed cards …
              Peter

              N 1 Reply Last reply Reply Quote 0
              • N Offline
                ninjabreadman @Peter
                last edited by

                @Peter At least it’s fixed! Cheers.

                Problem with config or JavaScript? Copy/paste it into JSHint.
                Check out the detailed walkthroughs on install, config, modules, etc.

                1 Reply Last reply Reply Quote 0
                • P Offline
                  pepebc
                  last edited by

                  I like this module, but I would like it to start hidden by default in order to add the possibility of making it visible with voice command (use alexyak / voicecontrol). I have tried several options but I have no results.

                  Mykle1M 1 Reply Last reply Reply Quote 0
                  • Mykle1M Offline
                    Mykle1 Project Sponsor Module Developer @pepebc
                    last edited by

                    @pepebc

                    Take a look at the Hello-Lucy files. You can adapt what you find there to alex yak voice control. :-)

                    Create a working config
                    How to add modules

                    1 Reply Last reply Reply Quote 0
                    • twosquirrelsT Offline
                      twosquirrels
                      last edited by

                      I realize this might not be the fault of the module, but many of my images display with the orientation incorrect on this module. I open them on my Mac, and the orientation is correct. I open them in the built-in image viewer on the raspberry pi, and the orientation is correct.

                      I’ve tried using exiftool to remove the orientation settings entirely with no success. I also tried using exiftool to change the orientation with no success.

                      My magic mirror is in portrait mode, so I wonder if that matters, but the built-in viewer has no problems.

                      N 1 Reply Last reply Reply Quote 0
                      • N Offline
                        ninjabreadman @twosquirrels
                        last edited by

                        @twosquirrels So, I suspect (but cannot be certain) that this is your problem. I’ve not found great browser support for EXIF image rotation. There are a variety of command line approaches available, and even some GUI apps.

                        Problem with config or JavaScript? Copy/paste it into JSHint.
                        Check out the detailed walkthroughs on install, config, modules, etc.

                        twosquirrelsT 1 Reply Last reply Reply Quote 1
                        • twosquirrelsT Offline
                          twosquirrels @ninjabreadman
                          last edited by

                          @ninjabreadman exiftran worked wonderfully! I used the “automatic” option and it fixed them all! Thanks!

                          1 Reply Last reply Reply Quote 0
                          • C Offline
                            chassain 0 @Galang
                            last edited by

                            @Galang Hello, no news about no random ? it will be great for my configuration
                            Thanks

                            S 1 Reply Last reply Reply Quote 0
                            • S Offline
                              sdetweil @chassain 0
                              last edited by

                              @chassain-0 ImagesPhotos already does random all the time.

                              	randomPhoto: function() {
                              		var photos = this.photos;
                              		var index = this.randomIndex(photos);
                              
                              		return photos[index];
                              	},
                              
                              
                              	getDom: function() {
                              		var self = this;
                              		var wrapper = document.createElement("div");
                              		var photoImage = this.randomPhoto();
                              

                              Sam

                              How to add modules

                              learning how to use browser developers window for css changes

                              C 1 Reply Last reply Reply Quote 0
                              • C Offline
                                chassain 0 @sdetweil
                                last edited by

                                @sdetweil sorry…i would say in order

                                S 1 Reply Last reply Reply Quote 0
                                • S Offline
                                  sdetweil @chassain 0
                                  last edited by

                                  @chassain-0 ah, turn off random

                                  Sam

                                  How to add modules

                                  learning how to use browser developers window for css changes

                                  1 Reply Last reply Reply Quote 0
                                  • C Offline
                                    chassain 0
                                    last edited by

                                    yes of course…but not so easy for me…i 'm looking for :)

                                    brobergB 1 Reply Last reply Reply Quote 0
                                    • brobergB Offline
                                      broberg Project Sponsor @chassain 0
                                      last edited by

                                      @chassain-0

                                      I don’t know if this works but

                                      	randomIndex: function(photos) {
                                      		if (photos.length === 1) {
                                      			return 0;
                                      		}
                                      
                                      		var generate = function() {
                                      			return Math.floor(Math.random() * photos.length);
                                      		};
                                      
                                      		var photoIndex = generate();
                                      		this.lastPhotoIndex = photoIndex;
                                      
                                      		return photoIndex;
                                      	},
                                      
                                      

                                      try to change return Math.floor(Math.random() * photos.length); to return Math.floor(photos.length);

                                      However it’s Just a guess

                                      S 1 Reply Last reply Reply Quote 0
                                      • S Offline
                                        sdetweil @broberg
                                        last edited by

                                        @broberg no. it needs more… need to USE the this.lastPhotoIndex, and check for over the end of the list,
                                        and reset the index when new list is loaded (even tho you didn’t get thru the list, as the module refreshes on a fixed time schedule (not calculated from number of images found)… I would add another config parm

                                        I have a fork of this module already, but have many local changes, so cannot make another.

                                        Sam

                                        How to add modules

                                        learning how to use browser developers window for css changes

                                        1 Reply Last reply Reply Quote 0
                                        • C Offline
                                          chassain 0
                                          last edited by

                                          Hello,

                                          I found this module : https://github.com/AdamMoses-GitHub/MMM-ImageSlideshow

                                          Maybe a solution. I m going to test this night

                                          1 Reply Last reply Reply Quote 0
                                          • KamiSchamiK Offline
                                            KamiSchami
                                            last edited by

                                            I would like to install it twice. If I just copy the folder and rename it, it won’t work anymore. Can somebody help me?

                                            Real programmers never work 9 to 5. If they are around at 9 AM, it's because they were up all night.

                                            1 Reply Last reply Reply Quote 0

                                            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
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 5
                                            • 4 / 5
                                            • 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