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

HEIC and MMM-ImagesPhotos

Scheduled Pinned Locked Moved Solved Troubleshooting
20 Posts 3 Posters 680 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.
  • S Away
    sdetweil @sdetweil
    last edited by Mar 29, 2025, 9:55 PM

    @rts58

    in front of

    img.onload()

    add

    img.onerror(){
       this.updateDom()
    }
    

    Sam

    How to add modules

    learning how to use browser developers window for css changes

    R 1 Reply Last reply Mar 29, 2025, 10:29 PM Reply Quote 0
    • R Offline
      rts58 @sdetweil
      last edited by Mar 29, 2025, 10:29 PM

      @sdetweil this is what I did which is creating an uncaught syntax error on the line with the first “{”.

      	img.onerror(){
      	this.updateDom()
      	}
              img.onload = (evt) => {
                // Get the image of the event
                const eventImage = evt.currentTarget;
                Log.log(
                  `image loaded=${eventImage.src} size=${eventImage.width}:${eventImage.height}`
      
      
      S 1 Reply Last reply Mar 29, 2025, 11:26 PM Reply Quote 0
      • S Away
        sdetweil @rts58
        last edited by Mar 29, 2025, 11:26 PM

        @rts58 im an idiot, sorry

        better

        img.onerror= ()=>{
        	this.updateDom()
        }
        

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        R 1 Reply Last reply Mar 30, 2025, 12:39 AM Reply Quote 0
        • R Offline
          rts58 @sdetweil
          last edited by Mar 30, 2025, 12:39 AM

          @sdetweil I’m not seeing any errors in the console.

          S 2 Replies Last reply Mar 30, 2025, 12:54 AM Reply Quote 0
          • S Away
            sdetweil @rts58
            last edited by sdetweil Mar 30, 2025, 12:54 AM Mar 30, 2025, 12:54 AM

            @rts58 i did not add error reporting yet, this should keep it
            from stalling

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            S 1 Reply Last reply Mar 30, 2025, 12:56 AM Reply Quote 1
            • S Away
              sdetweil @sdetweil
              last edited by Mar 30, 2025, 12:56 AM

              @rts58 the prior code started the timer only after
              image was loaded. but we have already waited timeout time
              so we can get the next image

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              1 Reply Last reply Reply Quote 1
              • S Away
                sdetweil @rts58
                last edited by sdetweil Mar 30, 2025, 4:24 AM Mar 30, 2025, 3:43 AM

                @rts58 just pushed the updated code, git pull in the module folder
                logs an error record to the dev window console on load fail, with the url of the failing image

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                R 2 Replies Last reply Mar 30, 2025, 3:54 AM Reply Quote 1
                • R Offline
                  rts58 @sdetweil
                  last edited by Mar 30, 2025, 3:54 AM

                  @sdetweil great, thanks. I’ll let you know how it goes.

                  1 Reply Last reply Reply Quote 0
                  • R Offline
                    rts58 @sdetweil
                    last edited by Mar 30, 2025, 1:06 PM

                    @sdetweil It’s working great now. No longer freezing on image files that it cannot open. And it is properly reflecting the error with the file name in the console! THANKS!

                    S 1 Reply Last reply Mar 30, 2025, 1:35 PM Reply Quote 1
                    • S Away
                      sdetweil @rts58
                      last edited by Mar 30, 2025, 1:35 PM

                      @rts58 awesome!!

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 2 / 2
                      2 / 2
                      • First post
                        18/20
                        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