Previously, I wrote how to change this here (it is in spanish). This is not working anymore.
The new way to do it is modifying the
desktoppicutre.db. To do this via the terminal, you simply need to do:
sqlite3 ~/Library/Application\ Support/Dock/desktoppicture.db "update data set value = '/Users/username/path/to/image.png'"
Once this is done, then you need to kill the Dock,