diff --git a/plugin/editor/cheditor5/imageUpload/upload.php b/plugin/editor/cheditor5/imageUpload/upload.php index 0d675e91b..9594f8c7a 100644 --- a/plugin/editor/cheditor5/imageUpload/upload.php +++ b/plugin/editor/cheditor5/imageUpload/upload.php @@ -9,10 +9,11 @@ if( !function_exists('che_reprocessImage') ){ function che_reprocessImage($file_path, $callback){ $MIME_TYPES_PROCESSORS = array( - "image/gif" => array("imagecreatefromgif", "imagegif"), + "image/gif" => array("imagecreatefromgif", "imagegif"), "image/jpg" => array("imagecreatefromjpeg", "imagejpeg"), "image/jpeg" => array("imagecreatefromjpeg", "imagejpeg"), - "image/png" => array("imagecreatefrompng", "imagepng"), + "image/png" => array("imagecreatefrompng", "imagepng"), + "image/webp" => array("imagecreatefromwebp", "imagewebp"), "image/bmp" => array("imagecreatefromwbmp", "imagewbmp") ); @@ -84,6 +85,7 @@ switch ($type) { case "jpeg": case "gif": case "png": + case "webp": $found = true; } diff --git a/plugin/editor/cheditor5/popup/image.html5.html b/plugin/editor/cheditor5/popup/image.html5.html index ed91fd34e..aceda6140 100644 --- a/plugin/editor/cheditor5/popup/image.html5.html +++ b/plugin/editor/cheditor5/popup/image.html5.html @@ -14,7 +14,7 @@
- image button diff --git a/plugin/editor/cheditor5/popup/image.html5.m.html b/plugin/editor/cheditor5/popup/image.html5.m.html index 0e88dd423..0f9debb67 100644 --- a/plugin/editor/cheditor5/popup/image.html5.m.html +++ b/plugin/editor/cheditor5/popup/image.html5.m.html @@ -14,7 +14,7 @@
- image button diff --git a/plugin/editor/cheditor5/popup/js/image.html5.js b/plugin/editor/cheditor5/popup/js/image.html5.js index 37b9a4559..40540d923 100644 --- a/plugin/editor/cheditor5/popup/js/image.html5.js +++ b/plugin/editor/cheditor5/popup/js/image.html5.js @@ -14,7 +14,7 @@ var activeImage = null, dragDropDiv, eventDiff_x = 0, eventDiff_y = 0, - fileTypeRe = /^image\/(png|jpeg|gif)$/i, + fileTypeRe = /^image\/(png|jpeg|gif|webp)$/i, geckoOffsetX_marker = -3, geckoOffsetY_marker = -1, imageCompleted = 0, @@ -434,7 +434,7 @@ function startUpload(list) { function fileFilterError(file) { alert("선택하신 '" + file + "' 파일은 전송할 수 없습니다.\n" + - "gif, png, jpg 사진 파일만 전송할 수 있습니다."); + "gif, png, jpg, webp 사진 파일만 전송할 수 있습니다."); } function imgComplete(img, imgSize, boxId) { diff --git a/plugin/editor/cheditor5/popup/js/image.html5.m.js b/plugin/editor/cheditor5/popup/js/image.html5.m.js index 67cedbf5d..c70470178 100644 --- a/plugin/editor/cheditor5/popup/js/image.html5.m.js +++ b/plugin/editor/cheditor5/popup/js/image.html5.m.js @@ -14,7 +14,7 @@ var activeImage = null, dragDropDiv, eventDiff_x = 0, eventDiff_y = 0, - fileTypeRe = /^image\/(png|jpeg|gif)$/i, + fileTypeRe = /^image\/(png|jpeg|gif|webp)$/i, geckoOffsetX_marker = -3, geckoOffsetY_marker = -1, imageCompleted = 0, @@ -434,7 +434,7 @@ function startUpload(list) { function fileFilterError(file) { alert("선택하신 '" + file + "' 파일은 전송할 수 없습니다.\n" + - "gif, png, jpg 사진 파일만 전송할 수 있습니다."); + "gif, png, jpg, webp 사진 파일만 전송할 수 있습니다."); } function imgComplete(img, imgSize, boxId) { diff --git a/plugin/editor/cheditor5/popup/js/image.js b/plugin/editor/cheditor5/popup/js/image.js index 7fc7c642f..706bfb413 100644 --- a/plugin/editor/cheditor5/popup/js/image.js +++ b/plugin/editor/cheditor5/popup/js/image.js @@ -335,7 +335,7 @@ function startUpload(count) { function fileFilterError(file) { alert("선택하신 '" + file + "' 파일은 전송할 수 없습니다.\n" + - "gif, png, jpg, 그림 파일만 전송할 수 있습니다."); + "gif, png, jpg, webp 그림 파일만 전송할 수 있습니다."); } function imgComplete(img, imgSize, boxId) { diff --git a/plugin/editor/cheditor5/popup/js/image_url.js b/plugin/editor/cheditor5/popup/js/image_url.js index fa5b85d7d..fd53e1582 100644 --- a/plugin/editor/cheditor5/popup/js/image_url.js +++ b/plugin/editor/cheditor5/popup/js/image_url.js @@ -54,7 +54,7 @@ function chkImgFormat (url) { var imageName = getFilename(url); var allowSubmit = false; - var extArray = [".gif", ".jpg", ".jpeg", ".png"]; + var extArray = [".gif", ".jpg", ".jpeg", ".png", ".webp"]; extArray.join(" "); if (imageName === "") { @@ -72,7 +72,7 @@ function chkImgFormat (url) } if (!allowSubmit) { - alert("사진은 GIF, JPG, PNG 형식만 넣을 수 있습니다."); + alert("사진은 GIF, JPG, PNG, WEBP 형식만 넣을 수 있습니다."); return false; }