Next.js Image Component Doesn't Render SVGs Correctly with Custom CSS Transformations
I'm experimenting with I'm getting frustrated with I'm trying to implement I need some guidance on After trying multiple solutions online, I still can't figure this out. I'm experiencing an scenario with the Next.js Image component when trying to render SVG images. I have a custom CSS transformation applied to the image, but the SVG does not scale or rotate as expected. Hereβs the relevant code snippet: ```jsx import Image from 'next/image'; import mySvg from '../public/my-image.svg'; const MyComponent = () => { return ( <div style={{ transform: 'rotate(45deg)', width: '200px', height: '200px' }}> <Image src={mySvg} alt="My SVG" layout="responsive" width={200} height={200} /> </div> ); }; export default MyComponent; ``` The SVG seems to be rendering as a bitmap rather than respecting the transformation, which I expected to rotate the image. I've checked the console for any errors, and I'm not seeing anything relevant. The SVG file is valid as it opens correctly in various viewers. I tried switching the `layout` prop to `fill`, but it didn't change anything. Any help on why the SVG image isn't responding to the CSS transformations would be appreciated. I'm using Next.js version 13.1.0. Is there something specific about how the Image component handles SVGs that I might be missing? For context: I'm using Javascript on Linux. My development environment is Linux. How would you solve this? I appreciate any insights! I'm working with Javascript in a Docker container on Windows 11. This issue appeared after updating to Javascript 3.9. Any ideas how to fix this?