This is a module for the MagicMirror². It will show photos from a directory.
This module reads the images from the uploads directory inside the module.
Directory: ~/MagicMirror/modules/MMM-ImagesPhotos/uploads
- Clone this repository inside your MagicMirror's
modulesfolder
cd ~/MagicMirror/modules
git clone https://github.com/sdetweil/MMM-ImagesPhotos
cd MMM-ImagesPhotos
npm installThe entry in config.js can include the following options:
| Option | Description |
|---|---|
opacity |
The opacity of the image. Type: doubleDefault 0.9 |
animationSpeed |
How long the fade out and fade in of photos should take. Type: intDefault 500 |
updateInterval |
How long before loading a new image. Type: int(milliseconds) Default 5000 milliseconds |
getInterval |
Interval value to get new images from directory. Type: int(milliseconds) Default 60000 milliseconds |
sequential |
true or false, whether to process the images randomly(default) or sequentially Default false |
only when position is NOT fullscreen_below or fullscreen_above |
|
maxWidth |
Value for maximum width. Optional, possible values: absolute (e.g. "700px") or relative ("50%") Default 100% |
maxHeight |
Value for maximum height. Optional, possible values: absolute (e.g. "400px") or relative ("70%") Default 100% |
only when position IS fullscreen_below or fullscreen_above |
|
backgroundColor |
Value for color used to fill around the image if not fullscreen, can be #xxyyzz, like #808080 (grey), if fill is true, the backgroundColor setting is ignored Default 'black' |
fill |
true or false, instead of color use a blurred copy of the image to fill around the image, Default false. |
blur |
the size of the pixel blur of the background fill, Default 8 |
sleepList |
List of notifcations that will suspend module |
wakeList |
List of notifications that will resume module |
showExifDate |
true or false, show date from photo's exif data if available. Default true. |
showDateLabel |
Prepend ExifDate with label "Photo Date:", Default false |
BigDataGeoAPI |
API key for use with loading geo data based on lat/long in Exif Data. (Sign up here https://www.bigdatacloud.com/reverse-geocoding) |
showCity |
true or false, show city,state,country from photo's exif data if available. Default true. |
With the addition of pulling Exif data, it is slightly slower to load. This will increase the more images you have. Over 900 images will initally load and start displaying in just over 1 minute running on a Pi 4 Model B.
A failed EXIF read no longer blocks the slideshow. The folder list refreshes on getInterval. Other modules (such as MMM-iCloudPhotos) can send MMM_IMAGESPHOTOS_REFRESH to reload immediately.
Here is an example of an entry in config.js
not fullscreen
{
module: "MMM-ImagesPhotos",
position: "middle_center",
config: {
opacity: 0.9,
animationSpeed: 500,
updateInterval: 5000,
maxHeight: "500px",
maxWidth:"500px",
sequential: false // process the image list randomly
sleepList: "SCREENSAVE_ENABLED", //Suspend when these notifications are recieved
wakeList: "SCREENSAVE_DISABLED", //Resume when these notifications are recieved
BigDataGeoAPI: "bXXX3",
showExifDate: true,
showDateLabel: false,
showCity: true,
}
},fullscreen
{
module: "MMM-ImagesPhotos",
position: "fullscreen_below",
config: {
opacity: 0.9,
animationSpeed: 500,
updateInterval: 5000,
backgroundColor: 'grey', // not used if fill is true
fill: false, // fill around image with blurred copy of image
blur: 10, // only used if fill is true
sequential: false, // process the image list randomly
sleepList: "SCREENSAVE_ENABLED", //Suspend when these notifications are recieved
wakeList: "SCREENSAVE_DISABLED", //Resume when these notifications are recieved
BigDataGeoAPI: "bXXX3",
showExifDate: true,
showDateLabel: false,
showCity: true,
}
},