어떤 이미지는 올라가고, 어떤 이미지는 안올라가요.

1년 전 조회 1,451

스마트 에디터를 쓰고 있습니다.

 

같은 확장자인데도, 어떤 이미지는 올라가고, 어떤 이미지는 안올라가는데

 

혹시 저와 비슷한 문제 겪고 있으신 분 계실까요??

 

계속 껏다 켰다 하니까 이런 로그를 뿜네요.

 

Copy
Uncaught Error: Call to undefined function imagecreatefromjpeg() in /usr/share/nginx/html/plugin/editor/smarteditor2/photo_uploader/popup/php/UploadHandler.php:1103

Stack trace:

php-fpm                 | #0 /usr/share/nginx/html/plugin/editor/smarteditor2/photo_uploader/popup/php/UploadHandler.php(1137): UploadHandler->reprocessImage()

php-fpm                 | #1 /usr/share/nginx/html/plugin/editor/smarteditor2/photo_uploader/popup/php/UploadHandler.php(1428): UploadHandler->handle_file_upload()

php-fpm                 | #2 /usr/share/nginx/html/plugin/editor/smarteditor2/photo_uploader/popup/php/UploadHandler.php(198): UploadHandler->post()

php-fpm                 | #3 /usr/share/nginx/html/plugin/editor/smarteditor2/photo_uploader/popup/php/UploadHandler.php(178): UploadHandler->initialize()

php-fpm                 | #4 /usr/share/nginx/html/plugin/editor/smarteditor2/photo_uploader/popup/php/index.php(55): UploadHandler->__construct()

php-fpm                 | #5 {main}

php-fpm                 |   thrown in /usr/share/nginx/html/plugin/editor/smarteditor2/photo_uploader/popup/php/UploadHandler.php on line 1103

php-fpm                 | 29/Mar/2024:02:58:01 +0000 "POST /plugin/editor/smarteditor2/photo_uploader/popup/php/index.php" 500

 

보니까 이런 주석이 있는데 jpg인데 webp일 수 있나요?

 

// webp 의 경우 gd-webp cannot allocate temporary buffer 오류가 발생하여 webp 이미지가 업로드 되지 않을 수 있음

// $reprocessed_image = imagecreatefromwebp($file_path); 이 코드로 웹서버의 error_log 에서 확인해 볼 수 있음

// https://stackoverflow.com/questions/61394477/php-e-error-gd-webp-cannot-allocate-temporary-buffer

// 움직이는 webp 이미지나 큰사이즈의 webp 이미지에 대한 해결 방안은 아직 없는 것 같다

답변 1개

자문 자답입니다...

php gd 라이브러리 활성화를 안해줬네요...

로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인
🐛 버그신고