Next.js에서 next/image 컴포넌트에 absolute를 직접 줬더니,
이미지가 섹션 전체 기준으로 배치되지 않고 이상한 크기/위치로 표시됨.
<section className="relative w-full h-[652px] bg-gray-100">
  <Image
    src="/images/cheongwol.svg"
    alt="청월아씨"
    width={298}
    height={500}
    className="absolute bottom-0 right-0" // ❌ 기대와 다르게 배치됨
  />
</section>
증상
absolute인데도 내가 기대한 부모 기준으로 안 맞음.next/image는 단순히 <img>만 렌더링하지 않고,
자동 최적화를 위해 숨겨진 래퍼 <span>을 하나 더 만든다.
<span style="position: relative; display:inline-block; width:298px; height:500px">
  <img src="/images/cheongwol.svg" ... />
</span>
<span>이 position: relative를 가지고 있음.<img>에 준 absolute는 섹션이 아니라 이 span 래퍼를 기준으로 잡힘.<section className="relative w-full h-[652px] bg-gray-100">
  <div className="absolute bottom-0 right-0">
    <Image
      src="/images/cheongwol.svg"
      alt="청월아씨"
      width={298}
      height={500}
      className="drop-shadow-lg"
    />
  </div>
</section>
absolute는 div에 적용됨.<Image />는 div 안에서만 크기 계산하니 정상 표시.<section className="relative w-full h-[652px] bg-gray-100">
  <div className="absolute bottom-0 right-0 w-[298px] h-[500px] relative">
    <Image
      src="/images/cheongwol.svg"
      alt="청월아씨"
      fill
      className="object-contain drop-shadow-lg"
    />
  </div>
</section>
fill 옵션을 쓰면 부모 div를 꽉 채우는 이미지가 됨.w/h를 지정해야 하고, relative도 필요.object-contain으로 원본 비율 유지 가능.문제: <Image class="absolute"> → 숨은 래퍼(span)를 기준으로 잡혀서 꼬임
원인: next/image가 자동으로 감싸는 <span>이 relative를 갖기 때문
해결:
absolute 적용fill 모드 + 부모 크기 지정