I am trying to convert a responsive img tag that uses different image sizes.
<img src="/img/theme/home/product-infra_x2.png" class="features__column__figure__img" srcset="/img/theme/home/product-infra_x3.png 1200w, /img/theme/home/product-infra_x2.png 800w" height="640" width="800" sizes="(max-width: 32em) 160px, 1200px" loading="lazy" alt="Image 1">
Now I will like to change this to use an SVG image file and keep the responsiveness and image sizing as same in react.
Here is what I have
import image1 from './images/image1.svg'
import image2 from './images/image2.svg'
<img src={image1} className="features__column__figure__img" height="640" width="800" sizes="(max-width: 32em) 160px, 1200px" loading="lazy" alt="Image 1">
...
...
...
<img src={image2} className="features__column__figure__img" height="640" width="800" sizes="(max-width: 32em) 160px, 1200px" loading="lazy" alt="Image 2">
But the images are not sized well and they are having different widths and heights for different SVG images.
how can I have the SVG responsive like it was setup with the HTML version?