修复webp转换其他格式失败
parent
8b05affa30
commit
736588e98d
14
README.md
14
README.md
|
@ -6,7 +6,7 @@
|
|||
>
|
||||
|
||||
[演示](https://png.cm/)
|
||||
[Chrome 拓展](https://github.com/icret/EasyImage-Browser-Extension)
|
||||
[Chrome/Edge 插件](https://github.com/icret/EasyImage-Browser-Extension)
|
||||
[使用手册](https://www.kancloud.cn/easyimage/easyimage/)
|
||||
[问题反馈](https://support.qq.com/products/367633)
|
||||
[QQ群](https://shang.qq.com/wpa/qunwpa?idkey=3feb4e8be8f1839f71e53bf2e876de36afc6889b2630c33c877d8df5a5583a6f)
|
||||
|
@ -102,10 +102,11 @@ $HTTP["url"] =~ "^/(i|public)/" {
|
|||
|
||||
## 更新日志
|
||||
|
||||
<details><summary><mark>点击查看2.0版更新日志</mark></summary>
|
||||
<details><summary>点击查看2.0版更新日志</summary>
|
||||
|
||||
* 2022-3-7 v2.5.6 dev
|
||||
* 2022-3-10 v2.5.6 dev
|
||||
- 修复加密删除后不能正确提示
|
||||
- 修复webp转换其他格式失败
|
||||
|
||||
* 2022-3-4 v2.5.5
|
||||
- 增加设置页面检测是否开启登录上传
|
||||
|
@ -402,7 +403,7 @@ RewriteRule config/(.*).(php)$ – [F]
|
|||
- ~~支持删除自定义删除图片(仅管理员)~~
|
||||
</details>
|
||||
|
||||
<details><summary><mark>与1.6.4版本差别</mark></summary>
|
||||
<details><summary>与1.6.4版本差别</summary>
|
||||
|
||||
##### 不建议再使用 [EasyImage 1.6.4版本](https://github.com/icret/easyImages)
|
||||
|
||||
|
@ -449,5 +450,6 @@ RewriteRule config/(.*).(php)$ – [F]
|
|||
- Copyright © 2018 EasyImage dev By [Icret](https://github.com/icret)
|
||||
|
||||
* have fun!
|
||||
|
||||
[](https://github.com/icret/EasyImages2.0/stargazers)
|
||||
|
||||

|
||||
[](https://github.com/icret/EasyImages2.0/stargazers)
|
||||
|
|
|
@ -39,7 +39,12 @@ if ($handle->uploaded) {
|
|||
// 最小高度
|
||||
$handle->image_min_height = $config['minHeight'];
|
||||
// 转换图片为指定格式
|
||||
$handle->image_convert = $config['imgConvert'];
|
||||
if (isset($config['imgConvert'])) {
|
||||
// 只转换非webp格式和非动态图片
|
||||
if ($handle->file_src_name_ext !== 'webp' && !isAnimatedGif($handle->file_src_pathname)) {
|
||||
$handle->image_convert = $config['imgConvert'];
|
||||
}
|
||||
}
|
||||
|
||||
// 存储图片路径:images/201807/
|
||||
$handle->process('../' . config_path());
|
||||
|
|
|
@ -127,4 +127,4 @@ function write_log($filePath, $sourceName, $absolutePath, $fileSize, $from = "We
|
|||
$log = array_replace($logs, $log);
|
||||
cache_write($logFileName, $log, 'logs');
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,7 +38,12 @@ if ($handle->uploaded) {
|
|||
// 最小高度
|
||||
$handle->image_min_height = $config['minHeight'];
|
||||
// 转换图片为指定格式
|
||||
$handle->image_convert = $config['imgConvert'];
|
||||
if (isset($config['imgConvert'])) {
|
||||
// 只转换非webp格式和非动态图片
|
||||
if ($handle->file_src_name_ext !== 'webp' && !isAnimatedGif($handle->file_src_pathname)) {
|
||||
$handle->image_convert = $config['imgConvert'];
|
||||
}
|
||||
}
|
||||
|
||||
/* 等比例缩减图片 放到前端了
|
||||
if ($config['imgRatio']) {
|
||||
|
@ -51,13 +56,6 @@ if ($handle->uploaded) {
|
|||
// 存储图片路径:images/201807/
|
||||
$handle->process(APP_ROOT . config_path());
|
||||
|
||||
/*
|
||||
// 创建缩略图 开启后会个别返回文件失败,暂时没找到替代方案,如果启用此项目,需要将list.php中的get_online_thumbnail改成return_thumbnail_images函数
|
||||
if ($config['thumbnail']) {
|
||||
@creat_thumbnail_images($handle->file_dst_name);
|
||||
}
|
||||
*/
|
||||
|
||||
// 图片完整相对路径:/i/2021/05/03/k88e7p.jpg
|
||||
if ($handle->processed) {
|
||||
header('Content-type:text/json');
|
||||
|
|
|
@ -39,7 +39,7 @@ $config=Array
|
|||
'imgRatio_quality'=>80,
|
||||
'imgRatio_crop'=>0,
|
||||
'imgRatio_preserve_headers'=>1,
|
||||
'static_cdn'=>1,
|
||||
'static_cdn'=>0,
|
||||
'theme'=>'default',
|
||||
'static_cdn_url'=>'https://cdn.jsdelivr.net/gh/icret/EasyImages2.0@2.5.5',
|
||||
'TinyPng_key'=>'',
|
||||
|
@ -99,7 +99,7 @@ var _hmt = _hmt || [];
|
|||
'image_recycl'=>1,
|
||||
'delDir'=>'thumbnails/',
|
||||
'version'=>'2.5.5',
|
||||
'update'=>'2022-03-07 12:32:21',
|
||||
'update'=>'2022-03-10 23:30:29',
|
||||
'terms'=>'<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
|
|
Loading…
Reference in New Issue