Programmatically add a background image to an Area

Permalink
Hi , I am trying to set the background image of an Area to an image based on a page attribute value. I can't seem to see any way to do this programmatically, only by editing the page itself in the user interface, does anyone know if this is the case or if I'm being blind.

Many thanks.