New to Kendo UI for jQuery? Download free 30-day trial

Set Size Limit for Images Uploaded with Editor ImageBrowser


Product Progress® Kendo UI® Editor for jQuery
Operating System All
Browser All
Preferred Language JavaScript


How can I set a size limit for the images that are uploaded with the ImageBrowser of the Editor?


  1. Check the size of the selected file in the select event handler of the Upload that is embedded in the ImageBrowser.
  2. Prevent the upload if the file size exceeds the specified limit.
    $(document).ready(function () {
        // Attach a click handler to the ImageBrowser tool of the Editor.
        $(".k-i-image").click(function () {
                // Attach a select handler to the Upload embedded in the ImageBrowser.
                $(".k-imagebrowser .k-upload").find("input").data("kendoUpload").bind("select", function (e) {
                    // Prevent the event if the selected file exceeds the specified limit.
                    if (e.files[0].size > 1048576) {
                        alert("Maximum allowed file size: 1MB");
In this article