Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: 이미지 깨짐 현상 수정을 위한 시도 #439

Merged
merged 3 commits into from
Sep 13, 2024

Conversation

wokbjso
Copy link
Member

@wokbjso wokbjso commented Sep 13, 2024

🤔 어떤 문제가 발생했나요?

  • 간혹 업로드 된 이미지가 깨진다는 QA가 들어왔습니다.

🎉 어떻게 해결했나요?

  • 업로드 전에 프론트 측에서 진행하는 resizing 과정에서 크기가 너무 딱 맞춰져 있는 게 원인일 수도 있겠다는 생각이 들었습니다. 해당 크기를 좀 더 넉넉히 설정해 주었습니다.

📷 이미지 첨부 (Option)

  • NA

⚠️ 유의할 점! (Option)

  • NA

@king2dwellsang king2dwellsang added the Review Plz🙏 # Review is not yet complete label Sep 13, 2024
@king2dwellsang king2dwellsang added the chore # Chores label Sep 13, 2024
Copy link
Collaborator

@hjy0951 hjy0951 left a comment

Choose a reason for hiding this comment

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

👍

@king2dwellsang king2dwellsang added Approved 🆗 # Review is completed and removed Review Plz🙏 # Review is not yet complete labels Sep 13, 2024
@@ -37,7 +37,7 @@ export function PhotoSection({
try {
if (e.target.files) {
const targetFile = e.target.files[0];
const resizedImage = await resizeFile(targetFile, 600, 600, 100);
const resizedImage = await resizeFile(targetFile, 800, 1000, 100);
Copy link
Member

Choose a reason for hiding this comment

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

800 1000이 어떤 값인가요?
width / height인가유?

Copy link
Member Author

@wokbjso wokbjso Sep 13, 2024

Choose a reason for hiding this comment

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

최대 width와 최대 height를 지정하는 속성이에요!!
확인해보니 기록 상세에서 최대로 나올 수 있는 이미지 크기가 560 * 672 인데, 이걸 고려하여 좀 더 넉넉히 최대 크기를 지정해주었습니다 :)

Copy link
Member

Choose a reason for hiding this comment

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

오호 맞아요. 보통 사용자에게 안깨지게 보이게 하기 위해서 저희 사내에서도 최소 1.5배의 사진 크기가 권장되고 있어요.
굿굿입니다!

@wokbjso wokbjso merged commit cd7c576 into main Sep 13, 2024
7 checks passed
@wokbjso wokbjso deleted the chore/image-resize branch September 13, 2024 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved 🆗 # Review is completed chore # Chores
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants