修复webp转换其他格式失败
parent
8b05affa30
commit
736588e98d
12
README.md
12
README.md
|
@ -6,7 +6,7 @@
|
||||||
>
|
>
|
||||||
|
|
||||||
[演示](https://png.cm/)
|
[演示](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://www.kancloud.cn/easyimage/easyimage/)
|
||||||
[问题反馈](https://support.qq.com/products/367633)
|
[问题反馈](https://support.qq.com/products/367633)
|
||||||
[QQ群](https://shang.qq.com/wpa/qunwpa?idkey=3feb4e8be8f1839f71e53bf2e876de36afc6889b2630c33c877d8df5a5583a6f)
|
[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
|
* 2022-3-4 v2.5.5
|
||||||
- 增加设置页面检测是否开启登录上传
|
- 增加设置页面检测是否开启登录上传
|
||||||
|
@ -402,7 +403,7 @@ RewriteRule config/(.*).(php)$ – [F]
|
||||||
- ~~支持删除自定义删除图片(仅管理员)~~
|
- ~~支持删除自定义删除图片(仅管理员)~~
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
<details><summary><mark>与1.6.4版本差别</mark></summary>
|
<details><summary>与1.6.4版本差别</summary>
|
||||||
|
|
||||||
##### 不建议再使用 [EasyImage 1.6.4版本](https://github.com/icret/easyImages)
|
##### 不建议再使用 [EasyImage 1.6.4版本](https://github.com/icret/easyImages)
|
||||||
|
|
||||||
|
@ -450,4 +451,5 @@ RewriteRule config/(.*).(php)$ – [F]
|
||||||
|
|
||||||
* have fun!
|
* 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_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/
|
// 存储图片路径:images/201807/
|
||||||
$handle->process('../' . config_path());
|
$handle->process('../' . config_path());
|
||||||
|
|
|
@ -38,7 +38,12 @@ if ($handle->uploaded) {
|
||||||
// 最小高度
|
// 最小高度
|
||||||
$handle->image_min_height = $config['minHeight'];
|
$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']) {
|
if ($config['imgRatio']) {
|
||||||
|
@ -51,13 +56,6 @@ if ($handle->uploaded) {
|
||||||
// 存储图片路径:images/201807/
|
// 存储图片路径:images/201807/
|
||||||
$handle->process(APP_ROOT . config_path());
|
$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
|
// 图片完整相对路径:/i/2021/05/03/k88e7p.jpg
|
||||||
if ($handle->processed) {
|
if ($handle->processed) {
|
||||||
header('Content-type:text/json');
|
header('Content-type:text/json');
|
||||||
|
|
|
@ -39,7 +39,7 @@ $config=Array
|
||||||
'imgRatio_quality'=>80,
|
'imgRatio_quality'=>80,
|
||||||
'imgRatio_crop'=>0,
|
'imgRatio_crop'=>0,
|
||||||
'imgRatio_preserve_headers'=>1,
|
'imgRatio_preserve_headers'=>1,
|
||||||
'static_cdn'=>1,
|
'static_cdn'=>0,
|
||||||
'theme'=>'default',
|
'theme'=>'default',
|
||||||
'static_cdn_url'=>'https://cdn.jsdelivr.net/gh/icret/EasyImages2.0@2.5.5',
|
'static_cdn_url'=>'https://cdn.jsdelivr.net/gh/icret/EasyImages2.0@2.5.5',
|
||||||
'TinyPng_key'=>'',
|
'TinyPng_key'=>'',
|
||||||
|
@ -99,7 +99,7 @@ var _hmt = _hmt || [];
|
||||||
'image_recycl'=>1,
|
'image_recycl'=>1,
|
||||||
'delDir'=>'thumbnails/',
|
'delDir'=>'thumbnails/',
|
||||||
'version'=>'2.5.5',
|
'version'=>'2.5.5',
|
||||||
'update'=>'2022-03-07 12:32:21',
|
'update'=>'2022-03-10 23:30:29',
|
||||||
'terms'=>'<div class="container">
|
'terms'=>'<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-3">
|
<div class="col-xs-3">
|
||||||
|
|
|
@ -103,7 +103,7 @@ mustLogin();
|
||||||
// 自动上传
|
// 自动上传
|
||||||
autoUpload: false,
|
autoUpload: false,
|
||||||
// 文件上传提交地址
|
// 文件上传提交地址
|
||||||
url: '/application/upload.php',
|
url: './application/upload.php',
|
||||||
// 最大支持的上传文件
|
// 最大支持的上传文件
|
||||||
max_file_size: <?php echo $config['maxSize']; ?>,
|
max_file_size: <?php echo $config['maxSize']; ?>,
|
||||||
// 分片上传 0为不分片 分片容易使图片上传失败
|
// 分片上传 0为不分片 分片容易使图片上传失败
|
||||||
|
|
Loading…
Reference in New Issue