Set Size Limit for Images Uploaded with Editor ImageBrowser


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


How can I set a size limit for the images uploaded with the Editor's ImageBrowser?


You can check the size of the selected file in the select event handler of the Upload embedded in the ImageBrowser and prevent the upload in case the file size exceeds the specified limit.

    $(document).ready(function () {
        //attach a click handler to the Editor's ImageBrowser tool
        $(".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 in case the selected file exceeds the specified limit
                    if (e.files[0].size > 1048576) {
                        alert("Maximum allowed file size: 1MB");
In this article
Not finding the help you need? Improve this article