diff --git a/modules/file/file.admin.controller.php b/modules/file/file.admin.controller.php index 2d75f3a8e..27048bdf1 100644 --- a/modules/file/file.admin.controller.php +++ b/modules/file/file.admin.controller.php @@ -87,7 +87,7 @@ class FileAdminController extends File $config->max_image_width = intval(Context::get('max_image_width')) ?: ''; $config->max_image_height = intval(Context::get('max_image_height')) ?: ''; $config->max_image_size_action = Context::get('max_image_size_action') ?: ''; - $config->max_image_size_same_format = Context::get('max_image_size_same_format') === 'Y' ? 'Y' : 'N'; + $config->max_image_size_same_format = strval(Context::get('max_image_size_same_format')); $config->max_image_size_admin = Context::get('max_image_size_admin') === 'Y' ? 'Y' : 'N'; $config->image_quality_adjustment = max(50, min(100, intval(Context::get('image_quality_adjustment')))); $config->image_autorotate = Context::get('image_autorotate') === 'Y' ? true : false; diff --git a/modules/file/file.controller.php b/modules/file/file.controller.php index 6d5865c4c..a39d15aca 100644 --- a/modules/file/file.controller.php +++ b/modules/file/file.controller.php @@ -1247,7 +1247,7 @@ class FileController extends File $adjusted['height'] = (int)$resize_height; if (!$is_animated && $adjusted['type'] === $image_info['type'] && $config->max_image_size_same_format !== 'Y') { - $adjusted['type'] = 'jpg'; + $adjusted['type'] = $config->max_image_size_same_format ?: 'jpg'; } } } diff --git a/modules/file/lang/en.php b/modules/file/lang/en.php index a23bd5b3b..e60ebd55d 100644 --- a/modules/file/lang/en.php +++ b/modules/file/lang/en.php @@ -90,11 +90,6 @@ $lang->use_video_default_file_config = 'Use Default Settings Of Video File'; $lang->about_use_video_default_file_config = 'Follow the video settings of image file from the File module.'; $lang->image_autoconv = 'Convert Type'; $lang->about_image_autoconv = 'Automatically convert uploaded images. This may help you handle image formats that are not widely supported or waste disk space.'; -$lang->image_autoconv_bmp2jpg = 'BMP → JPG'; -$lang->image_autoconv_png2jpg = 'PNG → JPG'; -$lang->image_autoconv_webp2jpg = 'WebP → JPG'; -$lang->image_autoconv_avif2jpg = 'AVIF → JPG'; -$lang->image_autoconv_heic2jpg = 'HEIC → JPG'; $lang->max_image_size = 'Limit Image Size'; $lang->about_max_image_size = 'Limit the dimensions of uploaded images. Note that this is only indirectly related to file size.'; $lang->max_image_size_action_nothing = 'If exceeded, do nothing'; @@ -102,7 +97,8 @@ $lang->max_image_size_action_block = 'If exceeded, block upload'; $lang->max_image_size_action_resize = 'If exceeded, resize automatically'; $lang->max_image_size_action_cut = 'If exceeded, cut automatically'; $lang->max_image_size_same_format_Y = 'Maintain file format'; -$lang->max_image_size_same_format_N = 'Convert to JPG'; +$lang->max_image_size_same_format_to_jpg = 'Convert to JPG'; +$lang->max_image_size_same_format_to_webp = 'Convert to WebP'; $lang->max_image_size_admin = 'Also apply to administrator'; $lang->image_quality_adjustment = 'Image Quality'; $lang->about_image_quality_adjustment = 'adjust the quality of images that will is converted by other settings.
If set to more than 75% (Standard), the file size may be larger than the original.'; diff --git a/modules/file/lang/ko.php b/modules/file/lang/ko.php index 049975340..87dc4b530 100644 --- a/modules/file/lang/ko.php +++ b/modules/file/lang/ko.php @@ -98,7 +98,8 @@ $lang->max_image_size_action_block = '초과시 업로드 금지'; $lang->max_image_size_action_resize = '초과시 자동 크기 조정'; $lang->max_image_size_action_cut = '초과시 자르기'; $lang->max_image_size_same_format_Y = '동일한 포맷 유지'; -$lang->max_image_size_same_format_N = 'JPG로 변환'; +$lang->max_image_size_same_format_to_jpg = 'JPG로 변환'; +$lang->max_image_size_same_format_to_webp = 'WebP로 변환'; $lang->max_image_size_admin = '관리자에게도 적용'; $lang->image_quality_adjustment = '이미지 화질'; $lang->about_image_quality_adjustment = '다른 설정에 의해 이미지가 변환될 경우 화질을 조정합니다.
75% (표준) 이상으로 설정시 오히려 원본보다 용량이 늘어날 수 있습니다.'; diff --git a/modules/file/tpl/upload_config.html b/modules/file/tpl/upload_config.html index 0bca141fc..d5ea25b61 100644 --- a/modules/file/tpl/upload_config.html +++ b/modules/file/tpl/upload_config.html @@ -70,12 +70,16 @@

-