resize images and add margin to header