What's the best way of making a Next.js image component fit the parent size?

<Image
  src="/images/other-img-1.jpg"
  alt="Server image"
  width={0}
  height={0}
  style={{ width: "100%", height: "100%" }}
/>


The width and height is necessary, though I can't set it to
"100%"
or something similar. How do I achieve this the best way possible without hard coding it?
Solution
Use fill property
Was this page helpful?