The problem is this:
Use: <input type="file" id="file" multiple size="5" accept="image/*">
When selecting image files, if the accept attribute limit is not added, the file selection window will be opened very quickly, but after the accept limit is added, the file selection window will become very slow.
Try the solution to specify MIME type