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
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion features/record/components/organisms/photo-section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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배의 사진 크기가 권장되고 있어요.
굿굿입니다!

setFormSubInfo((prev) => ({
...prev,
imageFiles: [...prev.imageFiles, resizedImage],
Expand Down
Loading