Hi, Would like to set a backgroundImage dynamically (I have attached 25 jpg files to a page) If I add this velocity code into my wiki page it works! {{velocity}} [[image:Photos.CdLSWorldbanners@${mathtool.random(1, 25)}.jpg||width="100%"]] {{/velocity}} If I add this same code in a stylesheet extension object: #document-title{ background:transparent url($doc.getAttachmentURL("Photos.CdLSWorldbanners@${mathtool.random(1, 25)}.jpg")) no-repeat scroll right center; } I get this result if I inspect the CSS in the browser: background:transparent url(/xwiki/bin/download/Sandbox/change%2Ddocument/Photos.CdLSWorldbanners%407.jpg) no-repeat scroll right center Any suggestions if this CAN work, and if possible; what am I doing wrong? Gerritjan