updated auto resize for background image.