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

[#654] 자체 이미지 최적화 작업 #656

Merged
merged 18 commits into from
Jul 10, 2024
Merged

[#654] 자체 이미지 최적화 작업 #656

merged 18 commits into from
Jul 10, 2024

Conversation

hanyugeon
Copy link
Member

구현 내용

Image 컴포넌트 작성

  • sharp라이브러리와 api routes를 활용하여 이미지 포맷 최적화를 구현했어요
  • 기존 Next/Image 컴포넌트를 랩핑하는 형식으로 구현했어요
    (이전에 사용했던 Next/Image들의 props들을 그대로 사용할 수 있음을 의미합니다!)
    (unoptimized = true를 넘겨주어 더 이상 vercel에서 이미지 캐싱을 진행하지 않아요.)

pr 포인트

자잘한 수정사항이 있어 files changed 카운트가 12가 됐어요
아래 기재된 3가지 코드만 확인해주시면 될 것 같아요!

  • api/imageOptimize/route.ts
  • components/Image.tsx
  • components/book/BookCover.tsx

관련 이슈

@hanyugeon hanyugeon added 🐥 프론트 필수! ✨ feature New feature or request 🔥 v.1.0 New feature for releasing v.1.0 labels Jul 4, 2024
@hanyugeon hanyugeon requested a review from gxxrxn July 4, 2024 08:20
@hanyugeon hanyugeon self-assigned this Jul 4, 2024
Copy link

vercel bot commented Jul 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
dadok ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 10, 2024 2:18pm

Copy link

github-actions bot commented Jul 4, 2024

Copy link

github-actions bot commented Jul 4, 2024

⚡️ Lighthouse Average Scores Across Reports:

Category Score
🔴 performance 67
🟢 accessibility 91
🟢 best practices 98
🟢 seo 100
🟢 pwa 100

⚡️ Average Details Across All Reports:

Category Score
🟢 first contentful paint 0.8s
🔴 largest contentful paint 12.2s
🟠 interactive 5.7s
🟢 total blocking time 241.4ms
🟢 cumulative layout shift 0.0

Copy link
Member

@gxxrxn gxxrxn left a comment

Choose a reason for hiding this comment

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

👍🏻 정말 좋으데요?!ㅎㅎ 코멘트 몇가지만 확인해주세요!! 수고하셨습니다! 👏🏻

src/components/common/Image.tsx Outdated Show resolved Hide resolved
src/components/common/Image.tsx Outdated Show resolved Hide resolved
Copy link
Member

@gxxrxn gxxrxn left a comment

Choose a reason for hiding this comment

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

💯

@hanyugeon hanyugeon merged commit ef5830c into main Jul 10, 2024
4 checks passed
@hanyugeon hanyugeon deleted the feat/#654 branch July 11, 2024 19:27
@hanyugeon hanyugeon mentioned this pull request Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ feature New feature or request 🐥 프론트 필수! 🔥 v.1.0 New feature for releasing v.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

자체 이미지 최적화 작업
2 participants