moved image background setting so it only happens once