I want to specify my image height only and keep the image aspect ratio without hardcoding the width.
In a traditional img
element I can do so:
<img src="/logo.png" alt="logo" height={30} />
But if I try using next/image
:
<Image src="/logo.png" alt="logo" height={30} />;
I get the following error:
Error: Image with src "/logo.png" must use "width" and "height" properties or "layout='fill'" property.