Only look up path of background image if there is one

This fixes an 'ActionView::Template::Error (isn't precompiled)' in
production.