(Created page with 'The CKFinder allows you to create thumbnails and to scale the uploaded images to the size preferred by you. In order to learn more, read this section. It will provide you informa…') |
|||
Line 1: | Line 1: | ||
The CKFinder allows you to create thumbnails and to scale the uploaded images to the size preferred by you. In order to learn more, read this section. It will provide you information about how to configure thumbnails and scaling options properly. Note that without the GD library CKFinder will be unable to resize images and the thumbnails will be disabled. | The CKFinder allows you to create thumbnails and to scale the uploaded images to the size preferred by you. In order to learn more, read this section. It will provide you information about how to configure thumbnails and scaling options properly. Note that without the GD library CKFinder will be unable to resize images and the thumbnails will be disabled. | ||
− | + | == Thumbnails == | |
+ | You can set thumbnails parameters by changing the following values: | ||
+ | <source lang="php">$config['Thumbnails'] = Array( | ||
+ | 'url' => $baseUrl . '_thumbs', | ||
+ | 'directory' => $baseDir . '_thumbs', | ||
+ | 'directAccess' => false, | ||
+ | 'bmpSupported' => false, | ||
+ | 'enabled' => true, | ||
+ | 'maxWidth' => 100, | ||
+ | 'maxHeight' => 100, | ||
+ | 'quality' => 80);</source> | ||
+ | {{Ckfinder_2.x Thumbnail Description|language=php}} | ||
− | + | == Scaling == | |
− | + | {{Ckfinder_2.x scaling description}} | |
+ | <source lang="php">$config['Images'] = Array( | ||
+ | 'maxWidth' => 1600, | ||
+ | 'maxHeight' => 1200, | ||
+ | 'quality' => 80); | ||
+ | </source> |
Revision as of 12:21, 18 May 2010
The CKFinder allows you to create thumbnails and to scale the uploaded images to the size preferred by you. In order to learn more, read this section. It will provide you information about how to configure thumbnails and scaling options properly. Note that without the GD library CKFinder will be unable to resize images and the thumbnails will be disabled.
Thumbnails
You can set thumbnails parameters by changing the following values:
$config['Thumbnails'] = Array( 'url' => $baseUrl . '_thumbs', 'directory' => $baseDir . '_thumbs', 'directAccess' => false, 'bmpSupported' => false, 'enabled' => true, 'maxWidth' => 100, 'maxHeight' => 100, 'quality' => 80);
-
maxWidth
andmaxHeight
– determine the maximum size of the thumbnails which can appear in CKFinder. These values are defined in pixels. You can obviously increase them, but the thumbnails will then look more like full-sized images than like miniatures.
-
quality
– sets the quality of a thumbnail in a range from1
to100
. The smaller the quality value, the smaller the size of the thumbnail. Notice that an acceptable quality value is about45
and the most frequently used one is about80
.
-
directAccess
– this setting may increase the overall performance of CKFinder. By default, CKFinder connects to the server connector to get the thumbnail. It is not a problem in most cases, because the connector sends theHTTP/304 Not Modified
header most of the time to save the traffic and reduce server-side processing. However, sometimes it is better to leave cache control to the browser. WhendirectAccess
is set totrue
, thumbnails are loaded directly from the_thumbs
folder by CKFinder. Note that it is impossible to use this setting, if the thumbnail directory is located outside the document root. -
bmpSupported
is a setting available only in the PHP connector, because the GD library in PHP does not support the.bmp
format. It is possible to enable support for.bmp
files in CKFinder. In this case CKFinder will use a special PHP class to manipulate such images. Because resizing of.bmp
files is relatively slow, this feature is disabled by default. - You may disable thumbnails by placing the bool value
false
in theenabled
section.
Scaling
The scaling (resizing) option allows you to define the maximum size of uploaded images. If the image size is bigger than the one specified by you, the image will be scaled to the defined dimensions.
You can also change the quality of uploaded images by setting it in a range from 1
to 100
. To apply these options you should change the following configuration settings:
$config['Images'] = Array( 'maxWidth' => 1600, 'maxHeight' => 1200, 'quality' => 80);