macOS - Determine current wallpaper path

I want to get current location of my macOS wallpaper. Is there a file or a command that will allow me to find this data?

I would prefer a way that would allow me to do it from the Terminal.

macOS: Mojave Public Beta


Solution 1:

This article from OSXDaily.com should be helpful:

Show the Location Path of Current Wallpaper in Mac OS X

  1. Type the following defaults write command:

defaults write com.apple.dock desktop-picture-show-debug-text -bool TRUE;killall Dock

  1. Go to the desktop to see the path printed over the wallpaper images

  1. After you’ve retrieved the desktop picture (use Command+Shift+G to bring up the Go To Folder window), or done what you have needed to do, you can hide the path text by using the following command:

defaults delete com.apple.dock desktop-picture-show-debug-text;killall Dock


To determine the path for wallpaper via Terminal, execute the following:

osascript -e 'tell app "finder" to get posix path of (get desktop picture as alias)'