kolbyjack / MMM-Wallpaper

MagicMirror module to display wallpapers from various online sources
https://magicmirror.builders/
MIT License
99 stars 31 forks source link

Set Images to Center_Middle of Screen #71

Closed mbosselle closed 2 years ago

mbosselle commented 2 years ago

Hey wondering how I would go about centring images in the middle of the screen? Currently, I'm restricting the images to the width of the screen. The images then justify to the top of the layout. My config is below

{
            module: "MMM-Wallpaper",
            position: "fullscreen_below",
            config: {
                source: "Local:/home/pi/Pictures/Magic Mirror Album",
                slideInterval: 1 * 60 * 1000,
                fadeEdges: true,
                fillRegion: false,
                width: 1080,
                height: "auto"
            }
        }

Thanks kindly for your time

kolbyjack commented 2 years ago

Instead of seeing the width and height manually, try setting "size": "contain"

mbosselle commented 2 years ago

Yep, that solved my issue.

Thank you very much