darickc / MMM-BackgroundSlideshow

MIT License
138 stars 79 forks source link

Better loading performance and better panorama scrolling #89

Closed DanielHabenicht closed 3 years ago

DanielHabenicht commented 3 years ago

Hi! Thanks for the great module.

I made some adaptions to make it run more smoothly:

  1. Added a custom loading handler for the images in express. (Before all images were loaded without caching, leading to loading the image three times (one for img.src, one for EXIF.getTags() and one for css url()), now the static images are loaded with a cache header of 1 hour and thus only loaded once.
  2. I also added a random scrolling for panorama pictures, now they do not only scroll from top to bottom (or left to right) but also the other way around.
  3. Lastly I formatted the files with prettier, but you don't have to use it, just makes it easier for me and more consistent.

I would be glad if you want to merge :)