aspect ratio fix in image preview