import * as React from 'react'; import { Image, IImageProps, ImageFit } from 'office-ui-fabric-react/lib/Image'; import { Label } from 'office-ui-fabric-react/lib/Label'; export const ImageContainExample = () => { const imageProps: IImageProps = { src: 'http://placehold.it/700x300', imageFit: ImageFit.contain, }; return (
Setting the imageFit property to "contain" will scale the image up or down to fit the frame, while maintaining its natural aspect ratio and without cropping the image.