0

They should only be resized on one of the two dimensions, whichever is bigger.

If you look at the puppy image below, it looks to be stetched enter image description here

CODE

export const ImageTemplateImage = styled.img`
  width: 230px;
  height: 162.53px; 
`;
jabinx92
  • 49
  • 7
  • I think this will answer your question: https://stackoverflow.com/questions/12991351/css-force-image-resize-and-keep-aspect-ratio – Tim Roberts Mar 18 '21 at 22:17

1 Answers1

0

If you don't give in a height for example, it will keep the ratio and only change the width. Therefore the height may not be set. At least is in css, I'm not familiar with reactjs, but I'm guessing this is an injection into the css.

Kenji Bailly
  • 107
  • 9
  • yea its kinda like an inject into the css, im thinking of just removing the height since that is the main issue for making it stretched – jabinx92 Mar 18 '21 at 22:23