resize and compress background image