If I understand your question correctly:
In my project, I used this style:
<h1 class="logo" style="background:url( #{mainMenuNavigationBean.headerImage} ) no-repeat;">
where mainMenuNavigationBean is a bean session where I set headerImage based on some conditions.
source share