Skip to content

Commit

Permalink
webp를 지원하는 서버에서만 이미지 업로드 확장자에 webp를 추가함
Browse files Browse the repository at this point in the history
  • Loading branch information
kagla committed Jul 24, 2021
1 parent 3f97138 commit d0e101b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion install/install_db.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,13 @@
//-------------------------------------------------------------------------------------------------
// config 테이블 설정
if($g5_install || !$result) {
// 기본 이미지 확장자를 설정하고
$image_extension = "gif|jpg|jpeg|png";
// 서버에서 webp 를 지원하면 확장자를 추가한다.
if (function_exists("imagewebp")) {
$image_extension .= "|webp";
}

$sql = " insert into `{$table_prefix}config`
set cf_title = '".G5_VERSION."',
cf_theme = 'basic',
Expand Down Expand Up @@ -197,7 +204,7 @@
cf_member_img_width = '60',
cf_member_img_height = '60',
cf_login_minutes = '10',
cf_image_extension = 'gif|jpg|jpeg|png|webp',
cf_image_extension = '{$image_extension}',
cf_flash_extension = 'swf',
cf_movie_extension = 'asx|asf|wmv|wma|mpg|mpeg|mov|avi|mp3',
cf_formmail_is_member = '1',
Expand Down

0 comments on commit d0e101b

Please sign in to comment.