sunhater / kcfinder

KCFinder web file manager
http://kcfinder.sunhater.com
402 stars 209 forks source link

Unknown image format/encoding #181

Open ghost opened 4 years ago

ghost commented 4 years ago

Hi I am using kcfinder. Is embeded in phplist as plugin.

When I try to upload an image I get the following error:

Unknown image format/encoding

What could be the cause of this?

response body:

<html><body><script type='text/javascript'>
var par = window.parent,
    op = window.opener,
    o = (par && par.CKEDITOR) ? par : ((op && op.CKEDITOR) ? op : false);
if (o !== false) {
    if (op) window.close();
    o.CKEDITOR.tools.callFunction(0, '', 'Unknown image format/encoding.');
} else {
    alert('Unknown image format/encoding.');
    if (op) window.close();
}
</script></body></html>
ghost commented 4 years ago

after digging into it I found the problem.

in the config file of kcfinder I had to change the drivers for images. Apparently I do not have imagemagick or gmagick. I think kcfinder should check if the software is installed before trying to use it.

kcfinder/conf/config.php

    'imageDriversPriority' => "gd", //"imagick gmagick gd"  <<< I changed this.phplist
    'jpegQuality' => 90,
    'thumbsDir' => ".thumbs",