知识

分享你我感悟

您当前位置>首页 >> 相关知识 >> Pbootcms>

  • PbootCMS上传图片变小怎么办

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

    image.png

    修改尺寸限制

    打开configconfig.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'
    
    ),