Skip to content

Conversation

@wo-o29
Copy link
Contributor

@wo-o29 wo-o29 commented Oct 25, 2025

📝 Key Changes

This PR fixes an issue where the ContributorHeader component couldn't render avatar images when using relative paths (ex: ../../images/contribute/suspense-error/hyungkyu.png).

Problem

  • VitePress processes markdown images (![](...)) differently from Vue component props
  • Markdown images are automatically bundled and hashed during build, but component prop strings are not statically analyzed
  • This caused avatar images to return 404 errors when using relative paths

Solution

  • Added dynamic image using import.meta.glob to bundle all contributor images at build time
  • Implemented fallback logic to support both absolute paths (/images/...) and relative paths

Impact

This change enables contributors to use the component as documented in the contribution template without encountering image rendering issues:

<ContributorHeader name="이름" avatar="../../images/contribute/profile-default.png" />

🖼️ Before and After Comparison

Before After
스크린샷 2025-10-25 오후 8 14 22 스크린샷 2025-10-25 오후 8 14 34

@vercel
Copy link

vercel bot commented Oct 25, 2025

@wo-o29 is attempting to deploy a commit to the Toss Team on Vercel.

A member of the Team first needs to authorize it.

@wo-o29 wo-o29 changed the title Fix: Support relative image paths in ContributorHeader component fix: Support relative image paths in ContributorHeader component Oct 25, 2025
Copy link
Collaborator

@milooy milooy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 You are the best!

@milooy
Copy link
Collaborator

milooy commented Nov 10, 2025

그 와중에 헤더에 변경사항이 들어가있어서 컨플릭이 났네요.
괜찮으실 때 컨플릭 해결 부탁드립니다! 🙏

@wo-o29
Copy link
Contributor Author

wo-o29 commented Nov 10, 2025

@milooy 수정해서 개발 / 빌드 결과물 환경에서 잘 나오는 것으로 확인했습니다!

개발 환경 빌드 결과물 환경
스크린샷 2025-11-10 오후 9 57 11 스크린샷 2025-11-10 오후 9 58 15

이전에 레거시 문서 삭제하는 작업도 진행하였는데, 괜찮으시다면 이것도 같이 검토 해주실 수 있으실까요?🙏🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants