updating image dimensions