mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-03 16:51:40 +09:00
Fix incorrect image extension "N" after upgrading from older version
This commit is contained in:
parent
3fb9d0acaa
commit
792ea89e64
1 changed files with 8 additions and 1 deletions
|
|
@ -1265,7 +1265,14 @@ 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'] = $config->max_image_size_same_format ?: 'jpg';
|
||||
if (in_array($config->max_image_size_same_format, ['jpg', 'png', 'webp']))
|
||||
{
|
||||
$adjusted['type'] = $config->max_image_size_same_format;
|
||||
}
|
||||
else
|
||||
{
|
||||
$adjusted['type'] = 'jpg';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue