반응형
<Image
key={idx}
src={file}
alt="image"
width="0"
height="0"
sizes="100%"
style={{ width: "300px", height: "auto" }}
/>
width, height = 0 으로 주고, sizes는 100%나 100vw로 지정한다.
그리고 style로 width, height를 지정하면 된다(둘 중 하나를 auto로 지정)
반응형