Easy Image - quick start
The aim of this article is to get you up and running with the Easy Image service.
This is a premium feature and you need a license for it on top of your CKEditor 5 commercial license. Contact us to receive an offer tailored to your needs.
You can also sign up for the CKEditor Premium Features 30-day free trial to test the feature.
# CKEditor 5 configuration options
The following configuration options need to be set in your CKEditor 5 configuration:
# Configuration
To make enabling image upload in CKEditor 5 a breeze, the EasyImage
plugin integrates with the Easy Image service provided by CKEditor Cloud Services. It is straightforward to enable it, and the results are immediate:
Configure CKEditor 5 (see CloudServicesConfig
):
ClassicEditor
.create( document.querySelector( '#editor' ), {
cloudServices: {
tokenUrl: 'https://example.com/cs-token-endpoint',
uploadUrl: 'https://your-organization-id.cke-cs.com/easyimage/upload/'
}
} )
.then( /* ... */ )
.catch( /* ... */ );
This is all. At this point, image upload will be automatically enabled in your application.
If you are having trouble setting up Easy Image, please contact us.
# Configuring allowed file types
The allowed file types that can be uploaded should be configured in two places:
- On the client side, restricting image upload through the CKEditor 5 UI and commands.
- On the server side, restricting the file formats that are accepted in Easy Image.
# Client-side configuration
Use the image.upload.types
configuration option to define the allowed image MIME types that can be uploaded to CKEditor 5.
By default, users are allowed to upload jpeg
, png
, gif
, bmp
, webp
and tiff
files. This corresponds with file formats supported by Easy Image, but you can modify the list to limit the number of allowed image types.
# Server-side configuration
Check the list of file formats supported by Easy Image. Currently, it is impossible to limit or extend this list. Any restrictions need to be introduced on the client side.