material-ui-image
material-ui-image copied to clipboard
Resizing the image
How can I resize the image? When I use imageStyles attribute, it resizes the image but there is an empty white space of the original image.

okay, well I was able to change the width of the entire container (including the white space) by doing
<style={ {width: 200} } but if I try to add height, or change only the height, it doesn't change at all. If I make it a width of 200, it just looks very squeezed. How can I change the width and height?
Try to define aspectRatio and cover properties of the Image component:
const aspectRatio = postData.fotoportada.width / postData.fotoportada.height;
...
<Image
src={postData.fotoportada.url}
aspectRatio={aspectRatio}
cover
/>