updated image resize maitaining aspect ratio