Working with Images

This website contains links to software which is either no longer maintained or will be supported only until the end of 2019 (CKFinder 2). For the latest documentation about current CKSource projects, including software like CKEditor 4/CKEditor 5, CKFinder 3, Cloud Services, Letters, Accessibility Checker, please visit the new documentation website.

If you look for an information about very old versions of CKEditor, FCKeditor and CKFinder check also the CKEditor forum, which was closed in 2015. If not, please head to StackOverflow for support.

(Article contents proof-read and formatted, some replaced with a template)
 
Line 1: Line 1:
 +
__TOC__
 
{{Ckfinder_2.x image description}}
 
{{Ckfinder_2.x image description}}
 
== Thumbnails ==
 
== Thumbnails ==
 
+
You can set thumbnails parameters by changing the following settings in the configuration file:
You can set configure thumbnails by using the following settings in the configuration file:
+
<source lang="asp">Thumbnails.Url = BaseUrl + "_thumbs/";
<source>Thumbnails.Url = BaseUrl + "_thumbs/";
 
 
Thumbnails.Dir = "";
 
Thumbnails.Dir = "";
 
Thumbnails.Enabled = true;
 
Thumbnails.Enabled = true;
Line 10: Line 10:
 
Thumbnails.Quality = 80;
 
Thumbnails.Quality = 80;
 
</source>  
 
</source>  
 +
 
==== Url and Dir ====
 
==== Url and Dir ====
 
+
The <code>Url</code> and <code>Dir</code> properties define the folder that contains all thumbnail images as well as the URL used to access them. It works just like the [[CKFinder_2.x/Developers Guide/ASP.NET/Configuration/Quick Start#Base URL and Directory|<code>BaseUrl</code> and <code>BaseDir</code>]] settings.
The Url and Dir properties defined the folder used to hold all thumbnail images, and the URL to access them. It works just like the [[CKFinder_2.x/Developers Guide/ASP.NET/Configuration/Quick Start#Base URL and Directory|BaseUrl and BaseDir]] settings.
 
  
 
==== Enabled ====
 
==== Enabled ====
 
+
If you set <code>Enabled</code> to <code>false</code>, CKFinder will not support thumbnails.
By setting Enabled to "false", CKFinder will have no support for thumbnails.
 
  
 
==== MaxWidth and MaxHeight ====
 
==== MaxWidth and MaxHeight ====
 
+
The <code>MaxWidth</code> and <code>MaxHeight</code> properties define the maximum dimensions of the thumbnails displayed in CKFinder. These values are expressed in pixels.
Sets the maximum size of the thumbnails displayed in CKFinder. These values are expressed in pixels.
 
  
 
==== Quality ====
 
==== Quality ====
 +
The <code>Quality</code> parameter defines the quality level used to produce thumbnails by setting it in a range from <code>1</code> to <code>100</code>. The smaller the quality value, the smaller the size of the thumbnail file. Notice that an acceptable value should not be less than <code>45</code>. For high-quality thumbnails <code>80</code> is more than sufficient.
  
Sets the quality level used to produce thumbnails in a range from 1 to 100. The smaller the quality the smaller the size of the thumbnail files. Notice that an acceptable value should not be less than 45. For quality thumbnails, 80 is more than sufficient.
+
== Scaling ==
 
+
{{Ckfinder_2.x scaling description}}
== Image Auto Scaling ==
+
<sourcelang="asp">Images.MaxWidth = 1600;
 
 
It is possible to configure CKFinder to automatically scale images to fit a maximum size. If the original image size is bigger than the one specified by you, the image size will be scaled down proportionally to fit your predefined values.
 
 
 
You may also change the quality of the scaling algorithm in a range from 1 to 100.
 
 
 
To apply these options you should change values in the configuration file:
 
<source>Images.MaxWidth = 1600;
 
 
Images.MaxHeight = 1200;
 
Images.MaxHeight = 1200;
 
Images.Quality = 80;</source>  
 
Images.Quality = 80;</source>  
  
== Verify Image Uploads ==
+
== 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 <code>SecureImageUploads</code> property to enable or disable this feature.
Image files may be improperly used to inject invalid content in your web site. To enhance the security of your server, CKFinder can automatically verify image files on upload. You can use the SecureImageUploads to enable/disable this feature:
+
<source lang="asp">
<pre>SecureImageUploads = true&nbsp;;
+
SecureImageUploads = true ;
</pre>
+
</source>

Latest revision as of 17:03, 30 March 2011

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 ;
This page was last edited on 30 March 2011, at 17:03.