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

feat: 이미지 업로드 압축 #267

Merged
merged 6 commits into from
Nov 4, 2023
Merged

feat: 이미지 업로드 압축 #267

merged 6 commits into from
Nov 4, 2023

Conversation

chanwukim
Copy link
Contributor

@chanwukim chanwukim commented Nov 3, 2023

📝 개요

  • 이미지 업로드시 압축 추가

🚀 변경사항

  • 성우 관리 모달에 검색 UI 추가하여 개선
2023-11-03.7.39.06.mov
  • 이미지 압축 추가

feat: fileToWebPFile #265

  • cloud flare wokers로 서버리스로 하려했는데, 웹 어셈블리어만 돌아가더라구요
  • 그래서 브라우저에서도 동작하는 https://github.com/fengyuanchen/compressorjs 를 사용했습니다
  • 현재 압축후 대략 60kb ~ 80kb로 압축돼요

🔗 관련 이슈

#256

➕ 기타

@chanwukim chanwukim added the feature 새 기능 추가 label Nov 3, 2023
@chanwukim chanwukim self-assigned this Nov 3, 2023
Comment on lines 14 to 18
new Compressor(file, {
quality,
mimeType: "image/webp",
maxWidth: 880,
height: 620,
Copy link
Collaborator

Choose a reason for hiding this comment

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

만약 크기가 1200x800 이미지를 넣으면 880x620로 변환되는건가요??

Copy link
Contributor Author

Choose a reason for hiding this comment

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

엇 height는 무조건 고정으로 들어가겠네요
max로 할경우 변환돼요

height

The height of the output image. If not specified, the natural height of the original image will be used, or if the width option is set, the height will be computed automatically by the natural aspect ratio.
출력 이미지의 높이입니다. 지정하지 않으면 원본 이미지의 자연 높이가 사용되거나 너비 옵션이 설정된 경우 자연 종횡비에 따라 높이가 자동으로 계산됩니다.

Copy link
Contributor

@imdaxsz imdaxsz left a comment

Choose a reason for hiding this comment

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

고생하셨습니다 👍👍

Copy link

cloudflare-workers-and-pages bot commented Nov 3, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: d522266
Status: ✅  Deploy successful!
Preview URL: https://61746c31.oduck-client.pages.dev
Branch Preview URL: https://feature-265.oduck-client.pages.dev

View logs

@chanwukim chanwukim merged commit 26e7527 into develop Nov 4, 2023
2 checks passed
@chanwukim chanwukim deleted the feature/265 branch November 4, 2023 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature 새 기능 추가
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants