简体   繁体   中英

How to create multiple thumbnails on CKFinder 3?

I am using CKFinder PHP 3.5.3.

When I upload an image, it creates only one default 150x150 thumbnail currently.

I tried the following configuration of a thumbnail on the config.php, but it doesn't work:

$config['thumbnails'] = array(
    'enabled'      => true,
    'sizes'        => array(
        array('width' => '150', 'height' => '150', 'quality' => 80),
        array('width' => '300', 'height' => '300', 'quality' => 80),
        array('width' => '500', 'height' => '500', 'quality' => 80),
    ),
    'bmpSupported' => true,
);

I would like to create multiple thumbnails such as 150x150, 300x300 and 500x500 when upload an image.

How can I generate multiple thumbnails when I upload an image?

In CKFinder 3 thumbnails of different sizes are generated lazily, on demand. This means the thumbnail of a given size will not be generated until requested by CKFinder's frontend. It's possible to change this behavior with a plugin. Here you can find a plugin I have created that enforces CKFinder to generate all the private thumbnails immediately after the file is uploaded.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM