I am using the image file upload control for users to upload there image. But I am facing challenges for implementing restriction on file size and file type.
The requirement is to allow user to upload the photo with size of less than 2 MB and file type should be .jpeg only.
Please need your support to implement limitation on image upload.
Thanks and regards,
Our KTImageInput is based on the HTML file input control which does not have such built-in file size restriction. However, you can do the file size validation in your backend and display the error message in the frontend.
To have more control over the file uploads you can consider using Dropzone.js plugin as shown here.