Added background image support and resizing