Skip to content
Show a random photo from an Unsplash collection
Branch: master
Clone or download
Latest commit bc0d6e0 Jan 8, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore Initial commit Apr 21, 2018 Added changelog Jan 8, 2019
MMM-Unsplash.js Added support for specifying image div id Jan 8, 2019 Updated readme Jan 8, 2019
package.json Initial commit Apr 21, 2018


A MagicMirror² module used to pull a random photo from one or more Unsplash collections. Like MMM-RandomPhoto, but for specific collections. Tested with MagicMirror² v2.2.2, v2.3.1 servers, Chrome 65 on Windows 10 and Midori 0.4.3 on a Raspberry Pi Zero W with Raspbian Jessie.


  1. Navigate into your MagicMirror's modules folder and execute git clone
  2. Add the module inside config.js placing it where you prefer.


Option Type Description Default
opacity double The opacity of the image. 0.3
collections string (REQUIRED) Comma-delimited list of collections to pull from. ''
width int Desired image width. 1080
height int Desired image height. 1920
orientation string Orientation of the image. Valid values: landscape, portrait, squarish 'portrait'
apiKey string (REQUIRED) Your Unsplash API key. ''
updateInterval int Number of seconds between image updates. Note that your API key is rate-limited, so if, for example, your rate limit was 50/hr, this should be no less than 72. 1800 (30mins)
divName string The ID of the div to use for the displayed image. This only needs to be set if you use something like MMM-ProfileSwitcher and/or need to be able to load images from multiple Unsplash modules at once. 'mmm-unsplash-placeholder'

Here is an example of an entry in config.js

	module: 'MMM-Unsplash',
	position: 'fullscreen_below',
	config: {
		collections: '369966,1240111,1136512,629911,150672,920773',
		apiKey: 'your_api_key'


Pull requests are very welcome! If you'd like to see any additional functionality, don't hesitate to let me know.



Special Thanks

MMM-RandomPhoto for the inspiration. The core image update functionality is cribbed from this module.

You can’t perform that action at this time.