pbootcms上传的图片被压缩变小怎么办

作者:PB模板网 发布时间:2020-08-11 浏览量:3126 次 点赞量:404 次

如果你碰到pbootcms上传图片变小的情况,那大概率是因为上传的图片尺寸超出了config配置中的图片最大尺寸,这是系统就会自动压缩尺寸。

image.png

修改尺寸限制

打开\config\config.php,找到

// 上传配置
'upload' => array(
    'format' => 'jpg,jpeg,png,gif,xls,xlsx,doc,docx,ppt,pptx,rar,zip,pdf,txt,mp4,avi,flv,rmvb,mp3,otf,ttf',
    'max_width' => '1920',
    'max_height' => ''
),

// 缩略图配置
'ico' => array(
    'max_width' => '1000',
    'max_height' => '1000'
),

根据自身的需求把上面的数值改大,例如缩略图尺寸1920px*2480px这种超长的,可以修改成

// 上传配置
'upload' => array(
    'format' => 'jpg,jpeg,png,gif,xls,xlsx,doc,docx,ppt,pptx,rar,zip,pdf,txt,mp4,avi,flv,rmvb,mp3,otf,ttf',
    'max_width' => '1920',
    'max_height' => ''
),

// 缩略图配置
'ico' => array(
    'max_width' => '1920',
    'max_height' => '10000'
),


感谢您的支持与鼓励

您的支持是我持续二开与分享的动力!

微信支付 微信支付
支付宝支付 支付宝
账号登录
免费注册
忘记密码?
💬

微信扫码咨询

微信二维码
🐧

在线客服

⏰ 工作时间: 09:00 - 18:00

👥

建站交流群

群号: 787980028