• 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.

MMM-Instagram - Pull and animate photos from Instagram feed

Scheduled Pinned Locked Moved Utilities
87 Posts 26 Posters 94.9k Views 27 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
    dr0pb0x
    last edited by Sep 3, 2016, 7:51 AM

    anyway to make the images smaller/larger?

    1 Reply Last reply Reply Quote 0
    • K Offline
      kapsolas Module Developer
      last edited by Sep 3, 2016, 3:26 PM

      Hi,

      I have not looked into autoresizing an image. It is on my list to get to when I have some time.

      The image at this point is not being resized, I just take it and display it as it comes from instagram.
      Videos will auto play when I get to them as well.

      Thanks!

      1 Reply Last reply Reply Quote 0
      • Y Offline
        yo-less Module Developer
        last edited by yo-less Sep 3, 2016, 7:31 PM Sep 3, 2016, 5:51 PM

        @dr0pb0x , @kapsolas I had a quick look at your code (Not a fan of the bit.ly link) and if you go about displaying the Instagram image this way:

        	var imageWrapper = document.createElement("img");
        	imageWrapper.src = tempimpage.photolink;
        	imageWrapper.style.maxWidth = this.config.instaMaxWidth;
        	imageWrapper.style.maxHeight = this.config.instaMaxHeight;
        	imageDisplay.appendChild(imageWrapper);
        

        you should be able to specify two parameters instaMaxWidth and instaMaxHeight that the user can change in their config.file so the beginning of your MMM-Instagram.js file would look like this:

            defaults: {
                format: 'json',
                lang: 'en-us',
                id: '',
                animationSpeed: 1000,
                updateInterval: 60000, // 10 minutes
                access_token: '',
                count: 200,
                min_timestamp: 0,
                loadingText: 'Loading...',
                instaMaxWidth: '100%',
                instaMaxHeight: '100%'
            },
        

        Now, any user of your module could define their own maximum image width and height, either by specifying an absolute figure like ‘300px’ or in relative terms using ‘20%’ or the like. I’ve created a pull request, but I suggest you test my code first as I don’t have an Instagram account or Instagram API key to test it.

        You can use my fork to do so: https://github.com/yo-less/MMM-Instagram

        D J 2 Replies Last reply Sep 3, 2016, 6:25 PM Reply Quote 0
        • D Offline
          dr0pb0x @yo-less
          last edited by Sep 3, 2016, 6:25 PM

          @yo-less unfortunately this didn’t work :( I even tried setting it to 1px/1% just to make sure but the images didnt change in size

          Y 1 Reply Last reply Sep 3, 2016, 6:26 PM Reply Quote 0
          • Y Offline
            yo-less Module Developer @dr0pb0x
            last edited by Sep 3, 2016, 6:26 PM

            @dr0pb0x Have you tried using my forked version here:
            https://github.com/yo-less/MMM-Instagram

            1 Reply Last reply Reply Quote 0
            • Y Offline
              yo-less Module Developer
              last edited by yo-less Sep 3, 2016, 8:23 PM Sep 3, 2016, 8:22 PM

              @dr0pb0x I’ve tried it with my forked version after changing the module to simply retrieve any picture from the internet. It’s working fine.
              The only limitation is that you can’t set the MaxHeight in relative terms (percentages), other than that, it works as intended as far as I can tell without actually using the API.

              D 1 Reply Last reply Sep 6, 2016, 2:09 PM Reply Quote 0
              • D Offline
                dr0pb0x @yo-less
                last edited by Sep 6, 2016, 2:09 PM

                @yo-less I just had a chance to try it out and it still doesn’t work for me. Could it possibly be Instagram’s API?

                http://stackoverflow.com/questions/21394100/what-are-the-different-image-size-formats-available-via-instagram-api

                Y 1 Reply Last reply Oct 1, 2016, 12:59 PM Reply Quote 0
                • D Offline
                  Diicken
                  last edited by Sep 25, 2016, 7:26 PM

                  Is there anyway to display images from my home server? And do someone have an idea how I should write the code?

                  1 Reply Last reply Reply Quote 0
                  • Y Offline
                    yo-less Module Developer @dr0pb0x
                    last edited by Oct 1, 2016, 12:59 PM

                    @dr0pb0x Anything is possible, but I doubt it. Please have @kapsolas help you with this, as I don’t have any direct way of testing it. As far as I’m concerned my code adjustments should work.

                    1 Reply Last reply Reply Quote 0
                    • M Offline
                      MichMich Admin
                      last edited by Oct 1, 2016, 1:10 PM

                      Awesome work! My SO is very pleased with this idea. You might want to add a screenshot to the repo.

                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 4
                      • 5
                      • 8
                      • 9
                      • 2 / 9
                      • 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