cheditor5 에 webp 이미지 업로드 할 수 있도록 수정. 움직이는 gif, webp 의 이미지가 정지되어 업로드 되고 있음. 원래 그런것 같음.
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user