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

에디터 본문과 미디어라이브러리에서 webp 이미지 확장자 지원 #1487

Open
highk opened this issue Feb 10, 2023 · 2 comments

Comments

@highk
Copy link
Contributor

highk commented Feb 10, 2023

문제

  • webp 이미지를 게시글에 업로드시 에디터에서는 이미지가 아닌 일반 파일 처럼 취급하는 문제
  • 미디어 라이브러리에서 프리뷰가 일반 파일처럼 출력되는 문제

해결방법

  • composer.json에서 Intervention/image 을 v2.1.x 에 의존하고 있는데, v2.4 이상으로 변경해야 webp를 처리할 수 있다.

     "require": {
             "intervention/image": "^2.4",
     },
  • xpressengine 코드에서 파일 확장자리스트에 webp 를 추가한다.

     xpressengine/config/filesystems.php
     xpressengine/core/src/Xpressengine/Media/Models/Image.php
     xpressengine/resources/assets/core/media_library/store.js
     xpressengine/resources/assets/core/utils/index.js
     xpressengine/resources/assets/core/media_library/vue/components/modal/slots/detail-body.vue
     xpressengine/resources/assets/core/media_library/vue/components/modal/slots/detail-toolbar.vue
    
@highk highk added this to the Laravel 6.x to 8.x milestone Feb 10, 2023
@highk highk self-assigned this Feb 10, 2023
@highk
Copy link
Contributor Author

highk commented Feb 13, 2023

Static Webp만 지원하게됩니다.
GD(Pecl) 라이브러리는 Animated Webp를 지원하지 못합니다.
GD를 Imagick으로 대체하면 지원할 방법은 있습니다.

@highk
Copy link
Contributor Author

highk commented Feb 13, 2023

https://github.com/xpressengine/xpressengine/tree/feature/support_webp 이 브랜치 사용시
composer update 를 해야 합니다.

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

When branches are created from issues, their pull requests are automatically linked.

1 participant