publish: randomize only if empty when changing background

generated from commit 1094e914d7099b515c5384b41a01c691158f1504