Contents
CKFinder allows you to create thumbnails and to scale uploaded images to the preferred size.
This section describes working with images. It will provide you with the information on how to properly configure thumbnails and image resizing options.
Thumbnails
You can set thumbnails parameters by changing the following settings in the configuration file:
Thumbnails.Url = BaseUrl + "_thumbs/"; Thumbnails.Dir = ""; Thumbnails.Enabled = true; Thumbnails.MaxWidth = 100; Thumbnails.MaxHeight = 100; Thumbnails.Quality = 80;
Url and Dir
The Url
and Dir
properties define the folder that contains all thumbnail images as well as the URL used to access them. It works just like the BaseUrl
and BaseDir
settings.
Enabled
If you set Enabled
to false
, CKFinder will not support thumbnails.
MaxWidth and MaxHeight
The MaxWidth
and MaxHeight
properties define the maximum dimensions of the thumbnails displayed in CKFinder. These values are expressed in pixels.
Quality
The Quality
parameter defines the quality level used to produce thumbnails by setting it in a range from 1
to 100
. The smaller the quality value, the smaller the size of the thumbnail file. Notice that an acceptable value should not be less than 45
. For high-quality thumbnails 80
is more than sufficient.
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:
<sourcelang="asp">Images.MaxWidth = 1600;
Images.MaxHeight = 1200;
Images.Quality = 80;</source>
Verifying Image Uploads
Image files may be improperly used to inject invalid content in your website. In order to enhance the security of your server CKFinder can automatically verify image files on upload. Use the SecureImageUploads
property to enable or disable this feature.
SecureImageUploads = true ;