To get a background image in Apex just add the following code to a region in a page or in css-part of a page. Putting it into a region its maybe easier to reference item with name of image and by using a process you could even randomise that. To get a region take the total width of page, just put it “after header”-position in template instead of body 1 or so..

Normal Page

<style>
@media (min-width:400px) { /* anything but mobile */
.t-PageBody .t-Body {
background: url(#APP_IMAGES#loginbackground/IMG_0744.JPG) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
}
</style>

LOGIN PAGE

For a login page change .t-PageBody to .t-PageBody–login

For a region it could work the same way, but use .t-Region .t-Region-body instead of .t-PageBody . t-Body